From 28e5744f3e5e78ab57917adb8514a4958e6ffa1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Mon, 30 Dec 2024 11:55:34 +0100 Subject: [PATCH] Remove trailing semicolons after function definitions --- .clang-format | 1 + src/engine/client/backend/null/backend_null.h | 2 +- src/engine/client/backend/opengl/backend_opengl.cpp | 2 +- src/game/client/gameclient.h | 4 ++-- src/game/client/prediction/entities/character.h | 2 +- src/game/editor/editor.cpp | 2 +- src/game/editor/editor_server_settings.h | 2 +- src/game/editor/mapitems/layer_tiles.cpp | 2 +- src/game/gamecore.h | 4 ++-- 9 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.clang-format b/.clang-format index 0e478c2889a..507d82e690e 100644 --- a/.clang-format +++ b/.clang-format @@ -46,6 +46,7 @@ IndentWidth: 8 KeepEmptyLinesAtTheStartOfBlocks: false PointerAlignment: Right ReflowComments: true +RemoveSemicolon: true SpaceBeforeParens: Never SpaceAfterTemplateKeyword: false TabWidth: 8 diff --git a/src/engine/client/backend/null/backend_null.h b/src/engine/client/backend/null/backend_null.h index dd767036706..ca1f9acba8c 100644 --- a/src/engine/client/backend/null/backend_null.h +++ b/src/engine/client/backend/null/backend_null.h @@ -5,7 +5,7 @@ class CCommandProcessorFragment_Null : public CCommandProcessorFragment_GLBase { - bool GetPresentedImageData(uint32_t &Width, uint32_t &Height, CImageInfo::EImageFormat &Format, std::vector &vDstData) override { return false; }; + bool GetPresentedImageData(uint32_t &Width, uint32_t &Height, CImageInfo::EImageFormat &Format, std::vector &vDstData) override { return false; } ERunCommandReturnTypes RunCommand(const CCommandBuffer::SCommand *pBaseCommand) override; bool Cmd_Init(const SCommand_Init *pCommand); virtual void Cmd_Texture_Create(const CCommandBuffer::SCommand_Texture_Create *pCommand); diff --git a/src/engine/client/backend/opengl/backend_opengl.cpp b/src/engine/client/backend/opengl/backend_opengl.cpp index 3ca11ff59ed..31d5aae4b40 100644 --- a/src/engine/client/backend/opengl/backend_opengl.cpp +++ b/src/engine/client/backend/opengl/backend_opengl.cpp @@ -243,7 +243,7 @@ static const char *GetGLErrorName(GLenum Type) else if(Type == GL_DEBUG_TYPE_POP_GROUP) return "POP_GROUP"; return "UNKNOWN"; -}; +} static const char *GetGLSeverity(GLenum Type) { diff --git a/src/game/client/gameclient.h b/src/game/client/gameclient.h index 10288126a02..01a02a3526d 100644 --- a/src/game/client/gameclient.h +++ b/src/game/client/gameclient.h @@ -522,12 +522,12 @@ class CGameClient : public IGameClient { m_Active = true; m_JoinTick = Tick; - }; + } void JoinSpec(int Tick) { m_Active = false; m_IngameTicks += Tick - m_JoinTick; - }; + } int GetIngameTicks(int Tick) const { return m_IngameTicks + Tick - m_JoinTick; } float GetFPM(int Tick, int TickSpeed) const { return (float)(m_Frags * TickSpeed * 60) / GetIngameTicks(Tick); } }; diff --git a/src/game/client/prediction/entities/character.h b/src/game/client/prediction/entities/character.h index cbdaed919bd..7795ea08333 100644 --- a/src/game/client/prediction/entities/character.h +++ b/src/game/client/prediction/entities/character.h @@ -115,7 +115,7 @@ class CCharacter : public CEntity { m_Input.m_TargetY = m_LatestInput.m_TargetY = -1; } - }; + } int GetJumped() { return m_Core.m_Jumped; } int GetAttackTick() { return m_AttackTick; } int GetStrongWeakId() { return m_StrongWeakId; } diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index d2a740ad81b..ff4e545ff6b 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -6091,7 +6091,7 @@ void CEditor::RemoveTimeOffsetEnvelope(const std::shared_ptr &pEnvelo Point.m_Time -= TimeOffset; m_OffsetEnvelopeX += fxt2f(TimeOffset) / m_ZoomEnvelopeX.GetValue(); -}; +} static float ClampDelta(float Val, float Delta, float Min, float Max) { diff --git a/src/game/editor/editor_server_settings.h b/src/game/editor/editor_server_settings.h index f4f1d6e2923..069d9e280fe 100644 --- a/src/game/editor/editor_server_settings.h +++ b/src/game/editor/editor_server_settings.h @@ -249,7 +249,7 @@ class CMapSettingsBackend : public CEditorComponent const std::shared_ptr &Setting() const { return m_pCurrentSetting; } CLineInput *LineInput() const { return m_pLineInput; } void SetFontSize(float FontSize) { m_FontSize = FontSize; } - int CommentOffset() const { return m_CommentOffset; }; + int CommentOffset() const { return m_CommentOffset; } int CheckCollision(ECollisionCheckResult &Result) const; int CheckCollision(const std::vector &vSettings, ECollisionCheckResult &Result) const; diff --git a/src/game/editor/mapitems/layer_tiles.cpp b/src/game/editor/mapitems/layer_tiles.cpp index db113f60fb6..3fdc8535e9a 100644 --- a/src/game/editor/mapitems/layer_tiles.cpp +++ b/src/game/editor/mapitems/layer_tiles.cpp @@ -280,7 +280,7 @@ static void InitGrabbedLayer(std::shared_ptr pLayer, CLayerTiles *pThisLayer) pLayer->m_Color = pThisLayer->m_Color; pLayer->m_Color.a = 255; } -}; +} int CLayerTiles::BrushGrab(std::shared_ptr pBrush, CUIRect Rect) { diff --git a/src/game/gamecore.h b/src/game/gamecore.h index 0cce06c2c4c..f63d4c24a71 100644 --- a/src/game/gamecore.h +++ b/src/game/gamecore.h @@ -178,8 +178,8 @@ class CCharacterCore CCollision *m_pCollision; public: - static constexpr float PhysicalSize() { return 28.0f; }; - static constexpr vec2 PhysicalSizeVec2() { return vec2(28.0f, 28.0f); }; + static constexpr float PhysicalSize() { return 28.0f; } + static constexpr vec2 PhysicalSizeVec2() { return vec2(28.0f, 28.0f); } vec2 m_Pos; vec2 m_Vel;