1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Fix missing code style changes

This commit is contained in:
cx384 2025-03-20 22:16:22 +01:00
parent 27b5d3288b
commit 3677bf844a
6 changed files with 6 additions and 6 deletions

View file

@ -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<s32>(source.length - i_offset, max_inv_length);

View file

@ -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)

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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;