Răsfoiți Sursa

Sonar fixes

Jorrit Rouwe 2 ani în urmă
părinte
comite
2eec160554

+ 1 - 1
Jolt/Core/JobSystem.h

@@ -105,7 +105,7 @@ public:
 		inline void			RemoveDependency(int inCount = 1) const		{ GetPtr()->RemoveDependencyAndQueue(inCount); }
 
 		/// Remove a dependency from a batch of jobs at once, this can be more efficient than removing them one by one as it requires less locking
-		static inline void	sRemoveDependencies(JobHandle *inHandles, uint inNumHandles, int inCount = 1);
+		static inline void	sRemoveDependencies(const JobHandle *inHandles, uint inNumHandles, int inCount = 1);
 
 		/// Helper function to remove dependencies on a static array of job handles
 		template <uint N>

+ 1 - 1
Jolt/Core/JobSystem.inl

@@ -25,7 +25,7 @@ void JobSystem::Job::RemoveDependencyAndQueue(int inCount)
 		mJobSystem->QueueJob(this);
 }
 
-void JobSystem::JobHandle::sRemoveDependencies(JobHandle *inHandles, uint inNumHandles, int inCount)
+void JobSystem::JobHandle::sRemoveDependencies(const JobHandle *inHandles, uint inNumHandles, int inCount)
 {
 	JPH_PROFILE_FUNCTION();
 

+ 1 - 1
Jolt/Physics/Constraints/ConstraintManager.cpp

@@ -250,7 +250,7 @@ bool ConstraintManager::RestoreState(StateRecorder &inStream)
 		return false;
 	}
 
-	for (Ref<Constraint> &c : mConstraints)
+	for (const Ref<Constraint> &c : mConstraints)
 		c->RestoreState(inStream);
 
 	return true;