mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Modernize src/c* src/d* and src/e* files (#6263)
* Modernize src/c* src/d* and src/e* files * default operator * redundant init * delete default constructors on CraftDefinition childs (never used) * fix some missing init values * const ref fix reported by clang-tidy * ranged-based for loops * simple conditions & returns * empty stl function instead of size * emplace_back stl function instead of push_back + construct temp obj * auto for some iterators * code style fixes * c++ stl headers instead of C stl headers (stdio.h -> cstdio)
This commit is contained in:
parent
921151d97a
commit
13e995b811
25 changed files with 298 additions and 343 deletions
|
@ -44,7 +44,7 @@ void PlayerDatabaseFiles::serialize(std::ostringstream &os, RemotePlayer *player
|
|||
args.setFloat("yaw", player->getPlayerSAO()->getYaw());
|
||||
args.setS32("breath", player->getPlayerSAO()->getBreath());
|
||||
|
||||
std::string extended_attrs = "";
|
||||
std::string extended_attrs;
|
||||
player->serializeExtraAttributes(extended_attrs);
|
||||
args.set("extended_attributes", extended_attrs);
|
||||
|
||||
|
@ -174,6 +174,6 @@ void PlayerDatabaseFiles::listPlayers(std::vector<std::string> &res)
|
|||
player.deSerialize(is, "", &playerSAO);
|
||||
is.close();
|
||||
|
||||
res.push_back(player.getName());
|
||||
res.emplace_back(player.getName());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue