Переглянути джерело

Applied some fixes suggested by sonarcloud

Jorrit Rouwe 4 роки тому
батько
коміт
ce2eed8322

+ 1 - 1
Jolt/AABBTree/AABBTreeBuilder.cpp

@@ -182,7 +182,7 @@ AABBTreeBuilder::Node *AABBTreeBuilder::Build(AABBTreeBuilderStats &outStats)
 	return root;
 }
 
-AABBTreeBuilder::Node *AABBTreeBuilder::BuildInternal(TriangleSplitter::Range &inTriangles)
+AABBTreeBuilder::Node *AABBTreeBuilder::BuildInternal(const TriangleSplitter::Range &inTriangles)
 {
 	// Check if there are too many triangles left
 	if (inTriangles.Count() > mMaxTrianglesPerLeaf)

+ 1 - 1
Jolt/AABBTree/AABBTreeBuilder.h

@@ -97,7 +97,7 @@ public:
 	Node *					Build(AABBTreeBuilderStats &outStats);
 
 private:
-	Node *					BuildInternal(TriangleSplitter::Range &inTriangles);
+	Node *					BuildInternal(const TriangleSplitter::Range &inTriangles);
 
 	TriangleSplitter &		mTriangleSplitter;
 	const uint				mMaxTrianglesPerLeaf;

+ 1 - 1
Jolt/Core/JobSystem.h

@@ -52,7 +52,7 @@ public:
 		/// Constructor 
 		inline				JobHandle()									{ }
 		inline				JobHandle(const JobHandle &inHandle)		: Ref<Job>(inHandle) { }
-		inline				JobHandle(JobHandle &&inHandle)				: Ref<Job>(move(inHandle)) { }
+		inline				JobHandle(JobHandle &&inHandle) noexcept	: Ref<Job>(move(inHandle)) { }
 
 		/// Constructor, only to be used by JobSystem
 		inline				JobHandle(Job *inJob)						: Ref<Job>(inJob) { }

+ 2 - 2
Jolt/Core/Reference.h

@@ -92,7 +92,7 @@ public:
 	inline					Ref()											: mPtr(nullptr) { }
 	inline					Ref(T *inRHS)									: mPtr(inRHS) { AddRef(); }
 	inline					Ref(const Ref<T> &inRHS)						: mPtr(inRHS.mPtr) { AddRef(); }
-	inline					Ref(Ref<T> &&inRHS)								: mPtr(inRHS.mPtr) { inRHS.mPtr = nullptr; }
+	inline					Ref(Ref<T> &&inRHS) noexcept					: mPtr(inRHS.mPtr) { inRHS.mPtr = nullptr; }
 	inline					~Ref()											{ Release(); }
 						
 	/// Assignment operators
@@ -145,7 +145,7 @@ public:
 	inline					RefConst()										: mPtr(nullptr) { }
 	inline					RefConst(const T * inRHS)						: mPtr(inRHS) { AddRef(); }
 	inline					RefConst(const RefConst<T> &inRHS)				: mPtr(inRHS.mPtr) { AddRef(); }
-	inline					RefConst(RefConst<T> &&inRHS)					: mPtr(inRHS.mPtr) { inRHS.mPtr = nullptr; }
+	inline					RefConst(RefConst<T> &&inRHS) noexcept			: mPtr(inRHS.mPtr) { inRHS.mPtr = nullptr; }
 	inline					RefConst(const Ref<T> &inRHS)					: mPtr(inRHS.mPtr) { AddRef(); }
 	inline					RefConst(Ref<T> &&inRHS)						: mPtr(inRHS.mPtr) { inRHS.mPtr = nullptr; }
 	inline					~RefConst()										{ Release(); }

+ 1 - 1
Jolt/Core/Result.h

@@ -34,7 +34,7 @@ public:
 	}
 
 	/// Move constructor
-						Result(Result<Type> &&inRHS)
+						Result(Result<Type> &&inRHS) noexcept
 	{
 		mState = inRHS.mState;
 

+ 4 - 1
sonar-project.properties

@@ -9,4 +9,7 @@ sonar.projectVersion=1.0
 sonar.sources=Jolt
 
 # Encoding of the source code. Default is default system encoding
-#sonar.sourceEncoding=UTF-8
+#sonar.sourceEncoding=UTF-8
+
+sonar.cfamily.threads=1
+sonar.cfamily.cache.enabled=false