Kaynağa Gözat

Whitespace fixes

Jorrit Rouwe 1 ay önce
ebeveyn
işleme
e43301b8b0

+ 3 - 3
.github/workflows/doxygen.yml

@@ -4,20 +4,20 @@ on:
   push:
   push:
     branches: [ master ]
     branches: [ master ]
 
 
-# Builds and deploys doxygen documentation  
+# Builds and deploys doxygen documentation
 jobs:
 jobs:
   build:
   build:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
 
 
     steps:
     steps:
     - uses: actions/checkout@v6
     - uses: actions/checkout@v6
-        
+
     - name: Doxygen Action
     - name: Doxygen Action
       uses: mattnotmitt/[email protected]
       uses: mattnotmitt/[email protected]
       with:
       with:
         doxyfile-path: "./Doxyfile"
         doxyfile-path: "./Doxyfile"
         working-directory: "."
         working-directory: "."
-    
+
     - name: Deploy
     - name: Deploy
       uses: peaceiris/actions-gh-pages@v4
       uses: peaceiris/actions-gh-pages@v4
       with:
       with:

+ 1 - 1
.github/workflows/sonar-cloud.yml

@@ -23,7 +23,7 @@ jobs:
         run: echo "defined=true" >> $GITHUB_OUTPUT
         run: echo "defined=true" >> $GITHUB_OUTPUT
         env:
         env:
           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
-          
+
   build:
   build:
     name: Build
     name: Build
     needs: [check-secret]
     needs: [check-secret]

+ 1 - 1
Build/Android/PerformanceTest/build.gradle

@@ -48,4 +48,4 @@ android {
 }
 }
 
 
 dependencies {
 dependencies {
-}
+}

+ 1 - 1
Build/Android/PerformanceTest/src/main/AndroidManifest.xml

@@ -17,4 +17,4 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-</manifest>
+</manifest>

+ 1 - 1
Build/Android/UnitTests/build.gradle

@@ -48,4 +48,4 @@ android {
 }
 }
 
 
 dependencies {
 dependencies {
-}
+}

+ 1 - 1
Build/Android/UnitTests/src/main/AndroidManifest.xml

@@ -17,4 +17,4 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-</manifest>
+</manifest>

+ 1 - 1
Build/Android/gradle.properties

@@ -18,4 +18,4 @@ android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
 android.enableJetifier=true
 android.nonTransitiveRClass=false
 android.nonTransitiveRClass=false
-android.nonFinalResIds=false
+android.nonFinalResIds=false

+ 1 - 1
Build/README.md

@@ -231,7 +231,7 @@ you have a mismatch between RTTI settings (MSVC: `/GR`/`/GR-`, clang: `-frtti`/`
 
 
 ### DirectX Error
 ### DirectX Error
 
 
-The samples use DirectX for the graphics implementation, when attempting to run the samples you may get a DirectX error pop-up which may say "The GPU device instance has been suspended", in your debugger you may see the message "Using the Redistributable D3D12 SDKLayers dll also requires that the latest SDKLayers for Windows 10 is installed.". 
+The samples use DirectX for the graphics implementation, when attempting to run the samples you may get a DirectX error pop-up which may say "The GPU device instance has been suspended", in your debugger you may see the message "Using the Redistributable D3D12 SDKLayers dll also requires that the latest SDKLayers for Windows 10 is installed.".
 
 
 Fix this by enabling "Graphics Tools" which is an optional Windows settings. To enable it you have to press the windows key, search for "Manage Optional Features", and then click "Add a Feature", and install "Graphics Tools".
 Fix this by enabling "Graphics Tools" which is an optional Windows settings. To enable it you have to press the windows key, search for "Manage Optional Features", and then click "Add a Feature", and install "Graphics Tools".
 
 

+ 2 - 2
TestFramework/Input/MacOS/KeyboardMacOS.h

@@ -23,13 +23,13 @@ public:
 	/// Buffered keyboard input, returns EKey::Invalid for none
 	/// Buffered keyboard input, returns EKey::Invalid for none
 	virtual EKey					GetFirstKey() override;
 	virtual EKey					GetFirstKey() override;
 	virtual EKey					GetNextKey() override;
 	virtual EKey					GetNextKey() override;
-	
+
 	/// Handle a key press event
 	/// Handle a key press event
 	void							OnKeyPressed(EKey inKey, bool inPressed);
 	void							OnKeyPressed(EKey inKey, bool inPressed);
 
 
 private:
 private:
 	bool							mKeyPressed[(int)EKey::NumKeys] = { };
 	bool							mKeyPressed[(int)EKey::NumKeys] = { };
 	StaticArray<EKey, 128>			mPendingKeyBuffer;
 	StaticArray<EKey, 128>			mPendingKeyBuffer;
-	StaticArray<EKey, 128>			mKeyBuffer;	
+	StaticArray<EKey, 128>			mKeyBuffer;
 	uint							mCurrentKey = 0;
 	uint							mCurrentKey = 0;
 };
 };

+ 2 - 2
TestFramework/Input/MacOS/KeyboardMacOS.mm

@@ -104,7 +104,7 @@ static EKey sToKey(GCKeyCode inValue)
 			strongSelf->mKeyboard->OnKeyPressed(ekey, pressed);
 			strongSelf->mKeyboard->OnKeyPressed(ekey, pressed);
 	};
 	};
 }
 }
-	
+
 @end
 @end
 
 
 bool KeyboardMacOS::Initialize(ApplicationWindow *inWindow)
 bool KeyboardMacOS::Initialize(ApplicationWindow *inWindow)
@@ -138,6 +138,6 @@ void KeyboardMacOS::OnKeyPressed(EKey inKey, bool inPressed)
 {
 {
 	if (inPressed && mPendingKeyBuffer.size() < mPendingKeyBuffer.capacity())
 	if (inPressed && mPendingKeyBuffer.size() < mPendingKeyBuffer.capacity())
 		mPendingKeyBuffer.push_back(inKey);
 		mPendingKeyBuffer.push_back(inKey);
-	
+
 	mKeyPressed[(int)inKey] = inPressed;
 	mKeyPressed[(int)inKey] = inPressed;
 }
 }

+ 2 - 2
TestFramework/Input/MacOS/MouseMacOS.h

@@ -40,14 +40,14 @@ public:
 
 
 private:
 private:
 	ApplicationWindowMacOS *		mWindow = nullptr;
 	ApplicationWindowMacOS *		mWindow = nullptr;
-	
+
 	int								mX = 0;
 	int								mX = 0;
 	int								mY = 0;
 	int								mY = 0;
 	int								mDeltaX = 0;
 	int								mDeltaX = 0;
 	int								mDeltaY = 0;
 	int								mDeltaY = 0;
 	int								mDeltaXAcc = 0;
 	int								mDeltaXAcc = 0;
 	int								mDeltaYAcc = 0;
 	int								mDeltaYAcc = 0;
-	
+
 	bool							mLeftPressed = false;
 	bool							mLeftPressed = false;
 	bool							mRightPressed = false;
 	bool							mRightPressed = false;
 	bool							mMiddlePressed = false;
 	bool							mMiddlePressed = false;

+ 3 - 3
TestFramework/Input/MacOS/MouseMacOS.mm

@@ -68,7 +68,7 @@
 		strongSelf->mMouse->SetMiddlePressed(pressed);
 		strongSelf->mMouse->SetMiddlePressed(pressed);
 	};
 	};
 }
 }
-	
+
 @end
 @end
 
 
 bool MouseMacOS::Initialize(ApplicationWindow *inWindow)
 bool MouseMacOS::Initialize(ApplicationWindow *inWindow)
@@ -77,7 +77,7 @@ bool MouseMacOS::Initialize(ApplicationWindow *inWindow)
 
 
 	// Install listener for mouse move callbacks
 	// Install listener for mouse move callbacks
 	mWindow->SetMouseMovedCallback([this](int inX, int inY) { OnMouseMoved(inX, inY); });
 	mWindow->SetMouseMovedCallback([this](int inX, int inY) { OnMouseMoved(inX, inY); });
-	
+
 	// Install listener for mouse delta callbacks (will work also when mouse is outside the window or at the edge of the screen)
 	// Install listener for mouse delta callbacks (will work also when mouse is outside the window or at the edge of the screen)
 	MouseDelegate *delegate = [[MouseDelegate alloc] init: this];
 	MouseDelegate *delegate = [[MouseDelegate alloc] init: this];
 	[NSNotificationCenter.defaultCenter addObserver: delegate selector: @selector(mouseDidConnect:) name: GCMouseDidConnectNotification object:nil];
 	[NSNotificationCenter.defaultCenter addObserver: delegate selector: @selector(mouseDidConnect:) name: GCMouseDidConnectNotification object:nil];
@@ -97,7 +97,7 @@ void MouseMacOS::Poll()
 {
 {
 	mDeltaX = mDeltaXAcc;
 	mDeltaX = mDeltaXAcc;
 	mDeltaY = mDeltaYAcc;
 	mDeltaY = mDeltaYAcc;
-	
+
 	mDeltaXAcc = 0;
 	mDeltaXAcc = 0;
 	mDeltaYAcc = 0;
 	mDeltaYAcc = 0;
 }
 }

+ 1 - 1
TestFramework/Renderer/DebugRendererImp.cpp

@@ -178,7 +178,7 @@ void DebugRendererImp::EnsurePrimitiveSpace(int inVtxSize)
 		// Create new
 		// Create new
 		mLockedPrimitive = mRenderer->CreateRenderPrimitive(PipelineState::ETopology::Triangle);
 		mLockedPrimitive = mRenderer->CreateRenderPrimitive(PipelineState::ETopology::Triangle);
 		mLockedPrimitive->CreateVertexBuffer(cVertexBufferSize, sizeof(Vertex));
 		mLockedPrimitive->CreateVertexBuffer(cVertexBufferSize, sizeof(Vertex));
-		
+
 		// Lock buffers
 		// Lock buffers
 		mLockedVerticesStart = mLockedVertices = (Vertex *)mLockedPrimitive->LockVertexBuffer();
 		mLockedVerticesStart = mLockedVertices = (Vertex *)mLockedPrimitive->LockVertexBuffer();
 		mLockedVerticesEnd = mLockedVertices + cVertexBufferSize;
 		mLockedVerticesEnd = mLockedVertices + cVertexBufferSize;

+ 1 - 1
TestFramework/Renderer/MTL/RenderPrimitiveMTL.h

@@ -32,7 +32,7 @@ public:
 
 
 private:
 private:
 	friend class 			RenderInstancesMTL;
 	friend class 			RenderInstancesMTL;
-	
+
 	RendererMTL *			mRenderer;
 	RendererMTL *			mRenderer;
 	MTLPrimitiveType		mPrimitiveType;
 	MTLPrimitiveType		mPrimitiveType;
 	id<MTLBuffer>			mVertexBuffer;
 	id<MTLBuffer>			mVertexBuffer;

+ 1 - 1
TestFramework/Renderer/MTL/RendererMTL.h

@@ -15,7 +15,7 @@ public:
 	/// Constructor / destructor
 	/// Constructor / destructor
 									RendererMTL();
 									RendererMTL();
 	virtual 						~RendererMTL() override;
 	virtual 						~RendererMTL() override;
-	
+
 	// See: Renderer
 	// See: Renderer
 	virtual void					Initialize(ApplicationWindow *inWindow) override;
 	virtual void					Initialize(ApplicationWindow *inWindow) override;
 	virtual ComputeSystem &			GetComputeSystem() override										{ return *this; }
 	virtual ComputeSystem &			GetComputeSystem() override										{ return *this; }

+ 1 - 1
TestFramework/Renderer/MTL/TextureMTL.mm

@@ -83,7 +83,7 @@ TextureMTL::TextureMTL(RendererMTL *inRenderer, int inWidth, int inHeight) :
 	descriptor.storageMode = MTLStorageModePrivate;
 	descriptor.storageMode = MTLStorageModePrivate;
 
 
 	mTexture = [inRenderer->GetDevice() newTextureWithDescriptor: descriptor];
 	mTexture = [inRenderer->GetDevice() newTextureWithDescriptor: descriptor];
-	
+
 	[descriptor release];
 	[descriptor release];
 }
 }
 
 

+ 4 - 4
TestFramework/Renderer/VK/RendererVK.cpp

@@ -52,7 +52,7 @@ RendererVK::~RendererVK()
 		cb = nullptr;
 		cb = nullptr;
 	for (Ref<ComputeBuffer> &cb : mPixelShaderConstantBuffer)
 	for (Ref<ComputeBuffer> &cb : mPixelShaderConstantBuffer)
 		cb = nullptr;
 		cb = nullptr;
-	
+
 	// Free all buffers
 	// Free all buffers
 	for (Array<BufferVK> &buffers : mPerFrameFreedBuffers)
 	for (Array<BufferVK> &buffers : mPerFrameFreedBuffers)
 	{
 	{
@@ -556,15 +556,15 @@ void RendererVK::CreateSwapChain(VkPhysicalDevice inDevice)
 void RendererVK::DestroySwapChain()
 void RendererVK::DestroySwapChain()
 {
 {
 	// Destroy semaphores
 	// Destroy semaphores
-	for (VkSemaphore semaphore : mImageAvailableSemaphores) 
+	for (VkSemaphore semaphore : mImageAvailableSemaphores)
 		vkDestroySemaphore(mDevice, semaphore, nullptr);
 		vkDestroySemaphore(mDevice, semaphore, nullptr);
 	mImageAvailableSemaphores.clear();
 	mImageAvailableSemaphores.clear();
 
 
-	for (VkSemaphore semaphore : mRenderFinishedSemaphores) 
+	for (VkSemaphore semaphore : mRenderFinishedSemaphores)
 		vkDestroySemaphore(mDevice, semaphore, nullptr);
 		vkDestroySemaphore(mDevice, semaphore, nullptr);
 	mRenderFinishedSemaphores.clear();
 	mRenderFinishedSemaphores.clear();
 
 
-	for (VkSemaphore semaphore : mAvailableSemaphores) 
+	for (VkSemaphore semaphore : mAvailableSemaphores)
 		vkDestroySemaphore(mDevice, semaphore, nullptr);
 		vkDestroySemaphore(mDevice, semaphore, nullptr);
 	mAvailableSemaphores.clear();
 	mAvailableSemaphores.clear();
 
 

+ 2 - 2
TestFramework/Renderer/VK/RendererVK.h

@@ -82,8 +82,8 @@ private:
 	VkDescriptorPool				mDescriptorPool = VK_NULL_HANDLE;
 	VkDescriptorPool				mDescriptorPool = VK_NULL_HANDLE;
 	VkDescriptorSet					mDescriptorSets[cFrameCount];
 	VkDescriptorSet					mDescriptorSets[cFrameCount];
 	VkDescriptorSet					mDescriptorSetsOrtho[cFrameCount];
 	VkDescriptorSet					mDescriptorSetsOrtho[cFrameCount];
-	VkSampler						mTextureSamplerShadow = VK_NULL_HANDLE;	
-	VkSampler						mTextureSamplerRepeat = VK_NULL_HANDLE;	
+	VkSampler						mTextureSamplerShadow = VK_NULL_HANDLE;
+	VkSampler						mTextureSamplerRepeat = VK_NULL_HANDLE;
 	VkRenderPass					mRenderPassShadow = VK_NULL_HANDLE;
 	VkRenderPass					mRenderPassShadow = VK_NULL_HANDLE;
 	VkRenderPass					mRenderPass = VK_NULL_HANDLE;
 	VkRenderPass					mRenderPass = VK_NULL_HANDLE;
 	VkPipelineLayout				mPipelineLayout = VK_NULL_HANDLE;
 	VkPipelineLayout				mPipelineLayout = VK_NULL_HANDLE;

+ 1 - 1
TestFramework/TestFramework.cmake

@@ -158,7 +158,7 @@ if (NOT CROSS_COMPILE_ARM AND (JPH_USE_VK OR JPH_USE_DX12 OR JPH_USE_MTL))
 			${TEST_FRAMEWORK_ROOT}/Window/ApplicationWindowLinux.h
 			${TEST_FRAMEWORK_ROOT}/Window/ApplicationWindowLinux.h
 		)
 		)
 	endif()
 	endif()
-		
+
 	if (APPLE)
 	if (APPLE)
 		# macOS source files
 		# macOS source files
 		set(TEST_FRAMEWORK_SRC_FILES
 		set(TEST_FRAMEWORK_SRC_FILES

+ 1 - 1
TestFramework/Utils/Log.mm

@@ -52,6 +52,6 @@ void FatalError [[noreturn]] (const char *inFMT, ...)
 	NSAlert *alert = [[[NSAlert alloc] init] autorelease];
 	NSAlert *alert = [[[NSAlert alloc] init] autorelease];
 	alert.messageText = [NSString stringWithCString: buffer encoding: NSUTF8StringEncoding];
 	alert.messageText = [NSString stringWithCString: buffer encoding: NSUTF8StringEncoding];
 	[alert runModal];
 	[alert runModal];
-	
+
 	exit(1);
 	exit(1);
 }
 }

+ 1 - 1
TestFramework/Window/ApplicationWindow.h

@@ -27,7 +27,7 @@ public:
 	/// Enter the main loop and keep rendering frames until the window is closed
 	/// Enter the main loop and keep rendering frames until the window is closed
 	using RenderCallback = std::function<bool()>;
 	using RenderCallback = std::function<bool()>;
 	virtual void					MainLoop(RenderCallback inRenderCallback) = 0;
 	virtual void					MainLoop(RenderCallback inRenderCallback) = 0;
-	
+
 	/// Function that will trigger the callback
 	/// Function that will trigger the callback
 	void							OnWindowResized(int inWidth, int inHeight) { mWindowWidth = inWidth; mWindowHeight = inHeight; if (mWindowResizeListener) { mWindowResizeListener(); } }
 	void							OnWindowResized(int inWidth, int inHeight) { mWindowWidth = inWidth; mWindowHeight = inHeight; if (mWindowResizeListener) { mWindowResizeListener(); } }
 
 

+ 2 - 2
TestFramework/Window/ApplicationWindowMacOS.h

@@ -30,7 +30,7 @@ public:
 
 
 	/// Enter the main loop and keep rendering frames until the window is closed
 	/// Enter the main loop and keep rendering frames until the window is closed
 	virtual void					MainLoop(RenderCallback inRenderCallback) override;
 	virtual void					MainLoop(RenderCallback inRenderCallback) override;
-	
+
 	/// Call the render callback
 	/// Call the render callback
 	bool							RenderCallback()						{ return mRenderCallback && mRenderCallback(); }
 	bool							RenderCallback()						{ return mRenderCallback && mRenderCallback(); }
 
 
@@ -44,4 +44,4 @@ protected:
 	ApplicationWindow::RenderCallback mRenderCallback;
 	ApplicationWindow::RenderCallback mRenderCallback;
 	MouseMovedCallback				mMouseMovedCallback;
 	MouseMovedCallback				mMouseMovedCallback;
 };
 };
-	
+

+ 3 - 3
TestFramework/Window/ApplicationWindowMacOS.mm

@@ -24,9 +24,9 @@
 	[device release];
 	[device release];
 
 
 	mWindow = window;
 	mWindow = window;
-	
+
 	self.delegate = self;
 	self.delegate = self;
-	
+
 	return self;
 	return self;
 }
 }
 
 
@@ -117,7 +117,7 @@ void ApplicationWindowMacOS::Initialize(const char *inTitle)
 void ApplicationWindowMacOS::MainLoop(ApplicationWindow::RenderCallback inRenderCallback)
 void ApplicationWindowMacOS::MainLoop(ApplicationWindow::RenderCallback inRenderCallback)
 {
 {
 	mRenderCallback = inRenderCallback;
 	mRenderCallback = inRenderCallback;
-	
+
 	@autoreleasepool
 	@autoreleasepool
 	{
 	{
 		NSApplication *app = [NSApplication sharedApplication];
 		NSApplication *app = [NSApplication sharedApplication];