diff --git a/src/client/hud.cpp b/src/client/hud.cpp index 8ecd9822a0..c0c45ed897 100644 --- a/src/client/hud.cpp +++ b/src/client/hud.cpp @@ -359,7 +359,7 @@ void Hud::drawHotbar(v2s32 screen_pos, v2f offset, u16 direction, std::size_t source_index = 0; u16 length_before = 0; for (s32 i_offset = inv_offset; source_index < sources.size(); source_index++) { - const HotbarSource::Source& source = sources[source_index]; + const HotbarSource::Source &source = sources[source_index]; if (i_offset < source.length) { s32 inv_length = std::min(source.length - i_offset, max_inv_length); diff --git a/src/remoteplayer.h b/src/remoteplayer.h index 5b1f0c4b1b..b1ae7c4c1d 100644 --- a/src/remoteplayer.h +++ b/src/remoteplayer.h @@ -35,7 +35,7 @@ public: RemotePlayerChatResult canSendChatMessage(); - void setHotbarSource(const HotbarSource& source) { hotbar_source = source; } + void setHotbarSource(const HotbarSource &source) { hotbar_source = source; } const HotbarSource& getHotbarSource() const { return hotbar_source; } void overrideDayNightRatio(bool do_override, float ratio) diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index 02eb8811a8..852b709ba3 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -1964,7 +1964,7 @@ int ObjectRef::l_get_hotbar_source(lua_State *L) lua_newtable(L); - auto& sources = player->hotbar_source.getSources(); + auto &sources = player->hotbar_source.getSources(); for (std::size_t i = 0; i < sources.size(); i++) { auto& source = sources[i]; lua_newtable(L); diff --git a/src/server.cpp b/src/server.cpp index 19e4607e4d..53d66d359d 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -3477,7 +3477,7 @@ bool Server::hudSetHotbarItemcountLegacy(RemotePlayer *player, s32 hotbar_itemco return true; } -bool Server::hudSetHotbarSource(RemotePlayer *player, const HotbarSource& source) +bool Server::hudSetHotbarSource(RemotePlayer *player, const HotbarSource &source) { if (!player) return false; diff --git a/src/server.h b/src/server.h index 73c5f0ed4a..a5cd7a700a 100644 --- a/src/server.h +++ b/src/server.h @@ -366,7 +366,7 @@ public: bool hudChange(RemotePlayer *player, u32 id, HudElementStat stat, void *value); bool hudSetFlags(RemotePlayer *player, u32 flags, u32 mask); bool hudSetHotbarItemcountLegacy(RemotePlayer *player, s32 hotbar_itemcount); - bool hudSetHotbarSource(RemotePlayer *player, const HotbarSource& source); + bool hudSetHotbarSource(RemotePlayer *player, const HotbarSource &source); void hudSetHotbarImage(RemotePlayer *player, const std::string &name); void hudSetHotbarSelectedImage(RemotePlayer *player, const std::string &name); diff --git a/src/util/hotbar_source.cpp b/src/util/hotbar_source.cpp index 8385bb4786..1acfbd2066 100644 --- a/src/util/hotbar_source.cpp +++ b/src/util/hotbar_source.cpp @@ -19,7 +19,7 @@ void HotbarSource::setHotbarItemcountLegacy(u16 count) bool HotbarSource::getInventoryFromWieldIndex(u16 wield_index, std::string &list, u16 &index) const { - for (auto& source : sources) { + for (auto &source : sources) { if (wield_index < source.length) { list = source.list; index = wield_index + source.offset;