From 19d980582f651927db64ff95c5d9de3aeacd3e17 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 27 Jun 2021 00:44:37 +0200 Subject: [PATCH] Clang-tidy: readability-static-definition-in-anonymous-namespace --- Source/controls/plrctrls.cpp | 2 +- Source/gamemenu.cpp | 4 ++-- Source/player.cpp | 2 +- Source/sync.cpp | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/controls/plrctrls.cpp b/Source/controls/plrctrls.cpp index bbec96839..ca565f54e 100644 --- a/Source/controls/plrctrls.cpp +++ b/Source/controls/plrctrls.cpp @@ -1010,7 +1010,7 @@ void SpellBookMove(AxisDirection dir) } } -static const Direction FaceDir[3][3] = { +const Direction FaceDir[3][3] = { // NONE UP DOWN { DIR_OMNI, DIR_N, DIR_S }, // NONE { DIR_W, DIR_NW, DIR_SW }, // LEFT diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index b24a83fc6..ff9d7a7bb 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -131,7 +131,7 @@ void gamemenu_sound_music_toggle(const char *const *names, TMenuItem *menu_item, menu_item->pszStr = names[1]; } -static int gamemenu_slider_music_sound(TMenuItem *menu_item) +int gamemenu_slider_music_sound(TMenuItem *menu_item) { return gmenu_slider_get(menu_item, VOLUME_MIN, VOLUME_MAX); } @@ -174,7 +174,7 @@ void gamemenu_get_speed() gmenu_slider_set(&sgOptionsMenu[3], 20, 50, sgGameInitInfo.nTickRate); } -static int gamemenu_slider_gamma() +int gamemenu_slider_gamma() { return gmenu_slider_get(&sgOptionsMenu[2], 30, 100); } diff --git a/Source/player.cpp b/Source/player.cpp index 486170b32..29f4d6dde 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -100,7 +100,7 @@ void WalkSides(int pnum, Point vel, const DirectionSettings &walkParams) player.position.temp = player.position.future; } -static constexpr std::array directionSettings { { +constexpr std::array directionSettings { { // clang-format off { DIR_S, { 1, 1 }, { 0, -32 }, { 0, 0 }, SDIR_S, PM_WALK2, WalkDownwards }, { DIR_SW, { 0, 1 }, { 32, -16 }, { 0, 0 }, SDIR_SW, PM_WALK2, WalkDownwards }, diff --git a/Source/sync.cpp b/Source/sync.cpp index a31f7bc8b..b9331cc8a 100644 --- a/Source/sync.cpp +++ b/Source/sync.cpp @@ -19,7 +19,7 @@ uint16_t sgwLRU[MAXMONSTERS]; int sgnSyncItem; int sgnSyncPInv; -static void sync_one_monster() +void sync_one_monster() { for (int i = 0; i < nummonsters; i++) { int m = monstactive[i]; @@ -32,7 +32,7 @@ static void sync_one_monster() } } -static void sync_monster_pos(TSyncMonster *p, int ndx) +void sync_monster_pos(TSyncMonster *p, int ndx) { p->_mndx = ndx; p->_mx = monster[ndx].position.tile.x; @@ -44,7 +44,7 @@ static void sync_monster_pos(TSyncMonster *p, int ndx) sgwLRU[ndx] = monster[ndx]._msquelch == 0 ? 0xFFFF : 0xFFFE; } -static bool sync_monster_active(TSyncMonster *p) +bool sync_monster_active(TSyncMonster *p) { int i, m, ndx; uint32_t lru; @@ -68,7 +68,7 @@ static bool sync_monster_active(TSyncMonster *p) return true; } -static bool sync_monster_active2(TSyncMonster *p) +bool sync_monster_active2(TSyncMonster *p) { int i, m, ndx; uint32_t lru; @@ -96,7 +96,7 @@ static bool sync_monster_active2(TSyncMonster *p) return true; } -static void SyncPlrInv(TSyncHeader *pHdr) +void SyncPlrInv(TSyncHeader *pHdr) { int ii; ItemStruct *pItem;