浏览代码

Sonar fixes

Jorrit Rouwe 2 年之前
父节点
当前提交
2eec160554
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      Jolt/Core/JobSystem.h
  2. 1 1
      Jolt/Core/JobSystem.inl
  3. 1 1
      Jolt/Physics/Constraints/ConstraintManager.cpp

+ 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;