diff --git a/Source/DiabloUI/selhero.cpp b/Source/DiabloUI/selhero.cpp index a6b288584..d10cef575 100644 --- a/Source/DiabloUI/selhero.cpp +++ b/Source/DiabloUI/selhero.cpp @@ -300,11 +300,11 @@ void SelheroClassSelectorEsc() void SelheroNameSelect(int /*value*/) { // only check names in multiplayer, we don't care about them in single - if (selhero_isMultiPlayer && !UiValidPlayerName(selhero_heroInfo.name)) { + if (selhero_isMultiPlayer && !UiValidPlayerName(selhero_heroInfo.name)) { ArtBackground.Unload(); UiSelOkDialog(title, _("Invalid name. A name cannot contain spaces, reserved characters, or reserved words.\n"), false); LoadBackgroundArt("ui_art\\selhero.pcx"); - } else{ + } else { if (gfnHeroCreate(&selhero_heroInfo)) { SelheroLoadSelect(1); return; diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 506acb8e0..0cac6c3be 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -396,8 +396,8 @@ void RightMouseDown() return; } if ((!sbookflag || !RightPanel.Contains(MousePosition)) - && !TryIconCurs() - && (pcursinvitem == -1 || !UseInvItem(MyPlayerId, pcursinvitem))) { + && !TryIconCurs() + && (pcursinvitem == -1 || !UseInvItem(MyPlayerId, pcursinvitem))) { if (pcurs == CURSOR_HAND) { if (pcursinvitem == -1 || !UseInvItem(MyPlayerId, pcursinvitem)) CheckPlrSpell(); diff --git a/Source/gendung.cpp b/Source/gendung.cpp index b392af35c..f9eecb877 100644 --- a/Source/gendung.cpp +++ b/Source/gendung.cpp @@ -613,5 +613,4 @@ void FloodTransparencyValues(uint8_t floorID) } } - } // namespace devilution diff --git a/Source/monster.cpp b/Source/monster.cpp index bc559f2a8..36cf5678c 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -1172,7 +1172,7 @@ void Teleport(int i) monster._mdir = GetMonsterDirection(monster); if (monster.mlid != NO_LIGHT) { - ChangeLightXY(monster.mlid, { x, y }); + ChangeLightXY(monster.mlid, { x, y }); } } } diff --git a/Source/options.cpp b/Source/options.cpp index 4e45ccfdc..7f6f6ebf6 100644 --- a/Source/options.cpp +++ b/Source/options.cpp @@ -303,7 +303,7 @@ void LoadOptions() env->DeleteLocalRef(clazz); #elif defined(__vita__) int32_t language = SCE_SYSTEM_PARAM_LANG_ENGLISH_US; // default to english - const char* vita_locales[] = { + const char *vita_locales[] = { "ja_JP", "en_US", "fr_FR", @@ -327,9 +327,9 @@ void LoadOptions() }; SceAppUtilInitParam initParam; SceAppUtilBootParam bootParam; - memset( &initParam, 0, sizeof(SceAppUtilInitParam) ); - memset( &bootParam, 0, sizeof(SceAppUtilBootParam) ); - sceAppUtilInit( &initParam, &bootParam ); + memset(&initParam, 0, sizeof(SceAppUtilInitParam)); + memset(&bootParam, 0, sizeof(SceAppUtilBootParam)); + sceAppUtilInit(&initParam, &bootParam); sceAppUtilSystemParamGetInt(SCE_SYSTEM_PARAM_ID_LANG, &language); if (language < 0 || language > SCE_SYSTEM_PARAM_LANG_TURKISH) language = SCE_SYSTEM_PARAM_LANG_ENGLISH_US; // default to english diff --git a/Source/platform/ctr/locale.cpp b/Source/platform/ctr/locale.cpp index 7fe187414..303e9c5e9 100644 --- a/Source/platform/ctr/locale.cpp +++ b/Source/platform/ctr/locale.cpp @@ -20,7 +20,7 @@ public: } }; -} +} // namespace std::string GetLocale() { diff --git a/Source/player.cpp b/Source/player.cpp index 1b959e037..331e3ced6 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -3546,7 +3546,7 @@ void CheckPlrSpell() if ( ((chrflag || QuestLogIsOpen) && LeftPanel.Contains(MousePosition)) // inside left panel - || ((invflag || sbookflag) && RightPanel.Contains(MousePosition)) // inside right panel + || ((invflag || sbookflag) && RightPanel.Contains(MousePosition)) // inside right panel ) { if (rspell != SPL_HEAL && rspell != SPL_IDENTIFY @@ -3713,7 +3713,7 @@ void CheckStats(PlayerStruct &player) int maxStatPoint = player.GetMaximumAttributeValue(attribute); switch (attribute) { case CharacterAttribute::Strength: - player._pBaseStr = clamp(player._pBaseStr, 0 , maxStatPoint); + player._pBaseStr = clamp(player._pBaseStr, 0, maxStatPoint); break; case CharacterAttribute::Magic: player._pBaseMag = clamp(player._pBaseMag, 0, maxStatPoint); diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index 0c1d12408..1e5c035c6 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -1212,7 +1212,7 @@ void DrawView(const Surface &out, int startX, int startY) DrawQuestLog(out); } if (!chrflag && Players[MyPlayerId]._pStatPts != 0 && !spselflag - && (!QuestLogIsOpen || !LeftPanel.Contains(MainPanel.position + Displacement { 0, -74 }))) { + && (!QuestLogIsOpen || !LeftPanel.Contains(MainPanel.position + Displacement { 0, -74 }))) { DrawLevelUpIcon(out); } if (ShowUniqueItemInfoBox) { diff --git a/Source/utils/log.hpp b/Source/utils/log.hpp index b3d3f5ed9..f904bad4d 100644 --- a/Source/utils/log.hpp +++ b/Source/utils/log.hpp @@ -39,7 +39,7 @@ enum class LogPriority { namespace detail { template -std::string format(const char *fmt, Args &&... args) +std::string format(const char *fmt, Args &&...args) { FMT_TRY { @@ -56,99 +56,99 @@ std::string format(const char *fmt, Args &&... args) } // namespace detail template -void Log(const char *fmt, Args &&... args) +void Log(const char *fmt, Args &&...args) { auto str = detail::format(fmt, std::forward(args)...); SDL_Log("%s", str.c_str()); } template -void LogVerbose(LogCategory category, const char *fmt, Args &&... args) +void LogVerbose(LogCategory category, const char *fmt, Args &&...args) { auto str = detail::format(fmt, std::forward(args)...); SDL_LogVerbose(static_cast(category), "%s", str.c_str()); } template -void LogVerbose(const char *fmt, Args &&... args) +void LogVerbose(const char *fmt, Args &&...args) { LogVerbose(defaultCategory, fmt, std::forward(args)...); } template -void LogDebug(LogCategory category, const char *fmt, Args &&... args) +void LogDebug(LogCategory category, const char *fmt, Args &&...args) { auto str = detail::format(fmt, std::forward(args)...); SDL_LogDebug(static_cast(category), "%s", str.c_str()); } template -void LogDebug(const char *fmt, Args &&... args) +void LogDebug(const char *fmt, Args &&...args) { LogDebug(defaultCategory, fmt, std::forward(args)...); } template -void LogInfo(LogCategory category, const char *fmt, Args &&... args) +void LogInfo(LogCategory category, const char *fmt, Args &&...args) { auto str = detail::format(fmt, std::forward(args)...); SDL_LogInfo(static_cast(category), "%s", str.c_str()); } template -void LogInfo(const char *fmt, Args &&... args) +void LogInfo(const char *fmt, Args &&...args) { LogInfo(defaultCategory, fmt, std::forward(args)...); } template -void LogWarn(LogCategory category, const char *fmt, Args &&... args) +void LogWarn(LogCategory category, const char *fmt, Args &&...args) { auto str = detail::format(fmt, std::forward(args)...); SDL_LogWarn(static_cast(category), "%s", str.c_str()); } template -void LogWarn(const char *fmt, Args &&... args) +void LogWarn(const char *fmt, Args &&...args) { LogWarn(defaultCategory, fmt, std::forward(args)...); } template -void LogError(LogCategory category, const char *fmt, Args &&... args) +void LogError(LogCategory category, const char *fmt, Args &&...args) { auto str = detail::format(fmt, std::forward(args)...); SDL_LogError(static_cast(category), "%s", str.c_str()); } template -void LogError(const char *fmt, Args &&... args) +void LogError(const char *fmt, Args &&...args) { LogError(defaultCategory, fmt, std::forward(args)...); } template -void LogCritical(LogCategory category, const char *fmt, Args &&... args) +void LogCritical(LogCategory category, const char *fmt, Args &&...args) { auto str = detail::format(fmt, std::forward(args)...); SDL_LogCritical(static_cast(category), "%s", str.c_str()); } template -void LogCritical(const char *fmt, Args &&... args) +void LogCritical(const char *fmt, Args &&...args) { LogCritical(defaultCategory, fmt, std::forward(args)...); } template -void LogMessageV(LogCategory category, LogPriority priority, const char *fmt, Args &&... args) +void LogMessageV(LogCategory category, LogPriority priority, const char *fmt, Args &&...args) { auto str = detail::format(fmt, std::forward(args)...); SDL_LogMessageV(static_cast(category), static_cast(priority), "%s", str.c_str()); } template -void LogMessageV(const char *fmt, Args &&... args) +void LogMessageV(const char *fmt, Args &&...args) { LogMessageV(defaultCategory, fmt, std::forward(args)...); } diff --git a/test/path_test.cpp b/test/path_test.cpp index 99792f8e5..c205919c2 100644 --- a/test/path_test.cpp +++ b/test/path_test.cpp @@ -113,7 +113,7 @@ void CheckPath(Point startPosition, Point destinationPosition, std::vector