mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Code modernization: src/n*, src/o* (#6280)
* Code modernization: src/n*, src/o* * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * remove unused IWritableNodeDefManager::clone() * C++ STL header style * Pointer constness in some functions
This commit is contained in:
parent
4a1265ceb5
commit
1992db1395
12 changed files with 207 additions and 287 deletions
|
@ -25,10 +25,9 @@ void NameIdMapping::serialize(std::ostream &os) const
|
|||
{
|
||||
writeU8(os, 0); // version
|
||||
writeU16(os, m_id_to_name.size());
|
||||
for (IdToNameMap::const_iterator i = m_id_to_name.begin();
|
||||
i != m_id_to_name.end(); ++i) {
|
||||
writeU16(os, i->first);
|
||||
os << serializeString(i->second);
|
||||
for (const auto &i : m_id_to_name) {
|
||||
writeU16(os, i.first);
|
||||
os << serializeString(i.second);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue