mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Modernize various files
* range-based for loops * emplace_back instead of push_back * code style * C++ headers instead of C headers * Default operators * empty stl function
This commit is contained in:
parent
13e995b811
commit
55ab4264dc
12 changed files with 100 additions and 118 deletions
|
@ -109,10 +109,9 @@ std::string gob_cmd_update_armor_groups(const ItemGroupList &armor_groups)
|
|||
std::ostringstream os(std::ios::binary);
|
||||
writeU8(os, GENERIC_CMD_UPDATE_ARMOR_GROUPS);
|
||||
writeU16(os, armor_groups.size());
|
||||
for(ItemGroupList::const_iterator i = armor_groups.begin();
|
||||
i != armor_groups.end(); ++i){
|
||||
os<<serializeString(i->first);
|
||||
writeS16(os, i->second);
|
||||
for (const auto &armor_group : armor_groups) {
|
||||
os<<serializeString(armor_group.first);
|
||||
writeS16(os, armor_group.second);
|
||||
}
|
||||
return os.str();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue