From d6cf12705679746edae0e39428c6e5acec0f01c3 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Sat, 6 Jul 2024 17:53:10 +0800 Subject: [PATCH] Fix some clang warnings in the editor --- src/game/editor/editor.cpp | 2 +- src/game/editor/editor.h | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 997d38be3..fde910023 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -917,7 +917,7 @@ bool CEditor::CallbackSaveSound(const char *pFileName, int StorageType, void *pU return false; } -void CEditor::DoAudioPreview(CUIRect View, const void *pPlayPauseButtonId, const void *pStopButtonId, const void *pSeekBarId, const int SampleId) +void CEditor::DoAudioPreview(CUIRect View, const void *pPlayPauseButtonId, const void *pStopButtonId, const void *pSeekBarId, int SampleId) { CUIRect Button, SeekBar; // play/pause button diff --git a/src/game/editor/editor.h b/src/game/editor/editor.h index 17637030d..151fa36ea 100644 --- a/src/game/editor/editor.h +++ b/src/game/editor/editor.h @@ -31,7 +31,6 @@ #include #include -#include "auto_map.h" #include "editor_history.h" #include "editor_server_settings.h" #include "editor_trackers.h" @@ -402,8 +401,8 @@ public: m_CheckerTexture.Invalidate(); m_BackgroundTexture.Invalidate(); - for(int i = 0; i < NUM_CURSORS; i++) - m_aCursorTextures[i].Invalidate(); + for(auto &CursorTexture : m_aCursorTextures) + CursorTexture.Invalidate(); m_CursorType = CURSOR_NORMAL; @@ -833,7 +832,7 @@ public: void RenderBackground(CUIRect View, IGraphics::CTextureHandle Texture, float Size, float Brightness) const; - SEditResult UiDoValueSelector(void *pId, CUIRect *pRect, const char *pLabel, int Current, int Min, int Max, int Step, float Scale, const char *pToolTip, bool IsDegree = false, bool IsHex = false, int corners = IGraphics::CORNER_ALL, const ColorRGBA *pColor = nullptr, bool ShowValue = true); + SEditResult UiDoValueSelector(void *pId, CUIRect *pRect, const char *pLabel, int Current, int Min, int Max, int Step, float Scale, const char *pToolTip, bool IsDegree = false, bool IsHex = false, int Corners = IGraphics::CORNER_ALL, const ColorRGBA *pColor = nullptr, bool ShowValue = true); static CUi::EPopupMenuFunctionResult PopupMenuFile(void *pContext, CUIRect View, bool Active); static CUi::EPopupMenuFunctionResult PopupMenuTools(void *pContext, CUIRect View, bool Active); @@ -1003,7 +1002,7 @@ public: void SelectGameLayer(); std::vector SortImages(); - void DoAudioPreview(CUIRect View, const void *pPlayPauseButtonId, const void *pStopButtonId, const void *pSeekBarId, const int SampleId); + void DoAudioPreview(CUIRect View, const void *pPlayPauseButtonId, const void *pStopButtonId, const void *pSeekBarId, int SampleId); // Tile Numbers For Explanations - TODO: Add/Improve tiles and explanations enum @@ -1127,7 +1126,6 @@ public: int FindNextFreeSwitchNumber(); int FindNextFreeTeleNumber(bool IsCheckpoint = false); -public: // Undo/Redo CEditorHistory m_EditorHistory; CEditorHistory m_ServerSettingsHistory; @@ -1139,7 +1137,6 @@ private: void UndoLastAction(); void RedoLastAction(); -private: std::map m_QuadDragOriginalPoints; };