diff --git a/src/actions.cpp b/src/actions.cpp index f1d021958a..37f8f2dadb 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -410,9 +410,9 @@ static void showUseHotkeyMessage(Player* player, const Item* item, uint32_t coun { const ItemType& it = Item::items[item->getID()]; if (!it.showCount) { - player->sendTextMessage(MESSAGE_INFO_DESCR, fmt::format("Using one of {:s}...", item->getName())); + player->sendTextMessage(MESSAGE_INFO_DESCR, fmt::format("Using one of {:s}...", item->getName())); } else if (count == 1) { - player->sendTextMessage(MESSAGE_INFO_DESCR, fmt::format("Using the last {:s}...", item->getName())); + player->sendTextMessage(MESSAGE_INFO_DESCR, fmt::format("Using the last {:s}...", item->getName())); } else { player->sendTextMessage(MESSAGE_INFO_DESCR, fmt::format("Using one of {:d} {:s}...", count, item->getPluralName())); } diff --git a/src/condition.cpp b/src/condition.cpp index 2bb54f7a06..56ba588cd8 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -792,7 +792,7 @@ int32_t ConditionAttributes::getParam(ConditionParam_t param) case CONDITION_PARAM_SKILL_FISHING: return skills[SKILL_FISHING]; - case CONDITION_PARAM_SKILL_FISHINGPERCENT: + case CONDITION_PARAM_SKILL_FISHINGPERCENT: return skillsPercent[SKILL_FISHING]; case CONDITION_PARAM_STAT_MAXHITPOINTS: diff --git a/src/const.h b/src/const.h index 7e41643bec..1c9f116aef 100644 --- a/src/const.h +++ b/src/const.h @@ -219,7 +219,7 @@ enum MessageClasses : uint8_t { MESSAGE_PARTY_MANAGEMENT = 34, /*White message in channel (+ channelId)*/ MESSAGE_PARTY = 35, /*White message in channel (+ channelId)*/ MESSAGE_EVENT_ORANGE = 36, /*Orange message in the console*/ - MESSAGE_STATUS_CONSOLE_ORANGE = 37, /*Orange message in the console*/ + MESSAGE_STATUS_CONSOLE_ORANGE = 37, /*Orange message in the console*/ }; enum FluidColors_t : uint8_t { @@ -344,7 +344,7 @@ enum TextColor_t : uint8_t { enum Icons_t { ICON_POISON = 1 << 0, ICON_BURN = 1 << 1, - ICON_ENERGY = 1 << 2, + ICON_ENERGY = 1 << 2, ICON_DRUNK = 1 << 3, ICON_MANASHIELD = 1 << 4, ICON_PARALYZE = 1 << 5, @@ -548,7 +548,7 @@ enum PlayerFlags : uint64_t { PlayerFlag_IsAlwaysPremium = static_cast(1) << 37, }; -enum ReloadTypes_t : uint8_t { +enum ReloadTypes_t : uint8_t { RELOAD_TYPE_ALL, RELOAD_TYPE_ACTIONS, RELOAD_TYPE_CHAT, diff --git a/src/fileloader.h b/src/fileloader.h index c55f6249a6..9f41b0f4aa 100644 --- a/src/fileloader.h +++ b/src/fileloader.h @@ -28,7 +28,7 @@ class PropStream; namespace OTB { using MappedFile = boost::iostreams::mapped_file_source; -using ContentIt = MappedFile::iterator; +using ContentIt = MappedFile::iterator; using Identifier = std::array; struct Node @@ -36,14 +36,14 @@ struct Node using ChildrenVector = std::vector; ChildrenVector children; - ContentIt propsBegin; - ContentIt propsEnd; - uint8_t type; + ContentIt propsBegin; + ContentIt propsEnd; + uint8_t type; enum NodeChar: uint8_t { ESCAPE = 0xFD, - START = 0xFE, - END = 0xFF, + START = 0xFE, + END = 0xFF, }; }; @@ -58,8 +58,8 @@ struct InvalidOTBFormat final : LoadError { }; class Loader { - MappedFile fileContents; - Node root; + MappedFile fileContents; + Node root; std::vector propBuffer; public: Loader(const std::string& fileName, const Identifier& acceptedIdentifier); diff --git a/src/game.h b/src/game.h index 2d9fa69b0f..324f9d2c2d 100644 --- a/src/game.h +++ b/src/game.h @@ -568,7 +568,7 @@ class Game static constexpr uint8_t LIGHT_DAY = 250; static constexpr uint8_t LIGHT_NIGHT = 40; - // 1h realtime = 1day worldtime + // 1h realtime = 1day worldtime // 2.5s realtime = 1min worldtime // worldTime is calculated in minutes static constexpr int16_t GAME_SUNRISE = 360; diff --git a/src/item.h b/src/item.h index 14c4f0b942..5a4c6896ab 100644 --- a/src/item.h +++ b/src/item.h @@ -294,7 +294,7 @@ class ItemAttributes } switch (pos) { - case 1: { // std::string + case 1: { // std::string std::string tmp; if (!propStream.readString(tmp)) { return false; diff --git a/src/luascript.cpp b/src/luascript.cpp index 5e79fa3192..0d06420161 100644 --- a/src/luascript.cpp +++ b/src/luascript.cpp @@ -4206,17 +4206,17 @@ int LuaScriptInterface::luaTablePack(lua_State* L) { // table.pack(...) int i; - int n = lua_gettop(L); /* number of elements to pack */ - lua_createtable(L, n, 1); /* create result table */ - lua_insert(L, 1); /* put it at index 1 */ - for (i = n; i >= 1; i--) /* assign elements */ + int n = lua_gettop(L); /* number of elements to pack */ + lua_createtable(L, n, 1); /* create result table */ + lua_insert(L, 1); /* put it at index 1 */ + for (i = n; i >= 1; i--) /* assign elements */ lua_rawseti(L, 1, i); if (luaL_callmeta(L, -1, "__index") != 0) { lua_replace(L, -2); } lua_pushinteger(L, n); - lua_setfield(L, 1, "n"); /* t.n = number of elements */ - return 1; /* return table */ + lua_setfield(L, 1, "n"); /* t.n = number of elements */ + return 1; /* return table */ } // Game diff --git a/src/luascript.h b/src/luascript.h index 1cabcf0eca..2a56d2120a 100644 --- a/src/luascript.h +++ b/src/luascript.h @@ -182,7 +182,7 @@ class ScriptEnvironment static DBResultMap tempResults; }; -#define reportErrorFunc(L, a) LuaScriptInterface::reportError(__FUNCTION__, a, L, true) +#define reportErrorFunc(L, a) LuaScriptInterface::reportError(__FUNCTION__, a, L, true) enum ErrorCode_t { LUA_ERROR_PLAYER_NOT_FOUND, diff --git a/src/mounts.cpp b/src/mounts.cpp index 48e7d1491c..9b21fe757a 100644 --- a/src/mounts.cpp +++ b/src/mounts.cpp @@ -42,7 +42,7 @@ bool Mounts::loadFromXml() for (auto mountNode : doc.child("mounts").children()) { uint16_t nodeId = pugi::cast(mountNode.attribute("id").value()); if (nodeId == 0 || nodeId > std::numeric_limits::max()) { - std::cout << "[Notice - Mounts::loadFromXml] Mount id \"" << nodeId << "\" is not within 1 and 255 range" << std::endl; + std::cout << "[Notice - Mounts::loadFromXml] Mount id \"" << nodeId << "\" is not within 1 and 255 range" << std::endl; continue; } diff --git a/src/otserv.cpp b/src/otserv.cpp index d52ab00fbd..418a9f01c9 100644 --- a/src/otserv.cpp +++ b/src/otserv.cpp @@ -112,7 +112,7 @@ void printServerVersion() { #if defined(GIT_RETRIEVED_STATE) && GIT_RETRIEVED_STATE std::cout << STATUS_SERVER_NAME << " - Version " << GIT_DESCRIBE << std::endl; - std::cout << "Git SHA1 " << GIT_SHORT_SHA1 << " dated " << GIT_COMMIT_DATE_ISO8601 << std::endl; + std::cout << "Git SHA1 " << GIT_SHORT_SHA1 << " dated " << GIT_COMMIT_DATE_ISO8601 << std::endl; #if GIT_IS_DIRTY std::cout << "*** DIRTY - NOT OFFICIAL RELEASE ***" << std::endl; #endif @@ -135,7 +135,7 @@ void printServerVersion() #if defined(LUAJIT_VERSION) std::cout << "Linked with " << LUAJIT_VERSION << " for Lua support" << std::endl; #else - std::cout << "Linked with " << LUA_RELEASE << " for Lua support" << std::endl; + std::cout << "Linked with " << LUA_RELEASE << " for Lua support" << std::endl; #endif std::cout << std::endl; diff --git a/src/signals.h b/src/signals.h index 2283eaa433..ee29c7a9f9 100644 --- a/src/signals.h +++ b/src/signals.h @@ -1,6 +1,6 @@ /** * The Forgotten Server - a free and open-source MMORPG server emulator - * Copyright (C) 2019 Mark Samman + * Copyright (C) 2019 Mark Samman * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by