瀏覽代碼

Whitespace fixes

Jorrit Rouwe 1 月之前
父節點
當前提交
e43301b8b0

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

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

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

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

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

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

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

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

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

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

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

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

+ 1 - 1
Build/Android/gradle.properties

@@ -18,4 +18,4 @@ android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
 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
 
-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".
 

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

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

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

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

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

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

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

@@ -68,7 +68,7 @@
 		strongSelf->mMouse->SetMiddlePressed(pressed);
 	};
 }
-	
+
 @end
 
 bool MouseMacOS::Initialize(ApplicationWindow *inWindow)
@@ -77,7 +77,7 @@ bool MouseMacOS::Initialize(ApplicationWindow *inWindow)
 
 	// Install listener for mouse move callbacks
 	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)
 	MouseDelegate *delegate = [[MouseDelegate alloc] init: this];
 	[NSNotificationCenter.defaultCenter addObserver: delegate selector: @selector(mouseDidConnect:) name: GCMouseDidConnectNotification object:nil];
@@ -97,7 +97,7 @@ void MouseMacOS::Poll()
 {
 	mDeltaX = mDeltaXAcc;
 	mDeltaY = mDeltaYAcc;
-	
+
 	mDeltaXAcc = 0;
 	mDeltaYAcc = 0;
 }

+ 1 - 1
TestFramework/Renderer/DebugRendererImp.cpp

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

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

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

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

@@ -15,7 +15,7 @@ public:
 	/// Constructor / destructor
 									RendererMTL();
 	virtual 						~RendererMTL() override;
-	
+
 	// See: Renderer
 	virtual void					Initialize(ApplicationWindow *inWindow) override;
 	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;
 
 	mTexture = [inRenderer->GetDevice() newTextureWithDescriptor: descriptor];
-	
+
 	[descriptor release];
 }
 

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

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

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

@@ -82,8 +82,8 @@ private:
 	VkDescriptorPool				mDescriptorPool = VK_NULL_HANDLE;
 	VkDescriptorSet					mDescriptorSets[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					mRenderPass = 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
 		)
 	endif()
-		
+
 	if (APPLE)
 		# macOS source 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];
 	alert.messageText = [NSString stringWithCString: buffer encoding: NSUTF8StringEncoding];
 	[alert runModal];
-	
+
 	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
 	using RenderCallback = std::function<bool()>;
 	virtual void					MainLoop(RenderCallback inRenderCallback) = 0;
-	
+
 	/// Function that will trigger the callback
 	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
 	virtual void					MainLoop(RenderCallback inRenderCallback) override;
-	
+
 	/// Call the render callback
 	bool							RenderCallback()						{ return mRenderCallback && mRenderCallback(); }
 
@@ -44,4 +44,4 @@ protected:
 	ApplicationWindow::RenderCallback mRenderCallback;
 	MouseMovedCallback				mMouseMovedCallback;
 };
-	
+

+ 3 - 3
TestFramework/Window/ApplicationWindowMacOS.mm

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