From ad148587dcf5244c2d2011dba339786c765c54c4 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 4 Nov 2020 16:19:54 +0100 Subject: Make Lint Happy --- src/nodemetadata.cpp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'src/nodemetadata.cpp') diff --git a/src/nodemetadata.cpp b/src/nodemetadata.cpp index b84ffc8cb..bab7a96af 100644 --- a/src/nodemetadata.cpp +++ b/src/nodemetadata.cpp @@ -31,9 +31,10 @@ with this program; if not, write to the Free Software Foundation, Inc., NodeMetadata */ -NodeMetadata::NodeMetadata(IItemDefManager *item_def_mgr): - m_inventory(new Inventory(item_def_mgr)) -{} +NodeMetadata::NodeMetadata(IItemDefManager *item_def_mgr) : + m_inventory(new Inventory(item_def_mgr)) +{ +} NodeMetadata::~NodeMetadata() { @@ -62,7 +63,7 @@ void NodeMetadata::deSerialize(std::istream &is, u8 version) { clear(); int num_vars = readU32(is); - for(int i=0; igetLists().empty(); } - void NodeMetadata::markPrivate(const std::string &name, bool set) { if (set) @@ -112,8 +112,8 @@ int NodeMetadata::countNonPrivate() const NodeMetadataList */ -void NodeMetadataList::serialize(std::ostream &os, u8 blockver, bool disk, - bool absolute_pos) const +void NodeMetadataList::serialize( + std::ostream &os, u8 blockver, bool disk, bool absolute_pos) const { /* Version 0 is a placeholder for "nothing to see here; go away." @@ -129,9 +129,7 @@ void NodeMetadataList::serialize(std::ostream &os, u8 blockver, bool disk, writeU8(os, version); writeU16(os, count); - for (NodeMetadataMap::const_iterator - i = m_data.begin(); - i != m_data.end(); ++i) { + for (NodeMetadataMap::const_iterator i = m_data.begin(); i != m_data.end(); ++i) { v3s16 p = i->first; NodeMetadata *data = i->second; if (data->empty()) @@ -150,8 +148,8 @@ void NodeMetadataList::serialize(std::ostream &os, u8 blockver, bool disk, } } -void NodeMetadataList::deSerialize(std::istream &is, - IItemDefManager *item_def_mgr, bool absolute_pos) +void NodeMetadataList::deSerialize( + std::istream &is, IItemDefManager *item_def_mgr, bool absolute_pos) { clear(); @@ -163,8 +161,8 @@ void NodeMetadataList::deSerialize(std::istream &is, } if (version > 2) { - std::string err_str = std::string(FUNCTION_NAME) - + ": version " + itos(version) + " not supported"; + std::string err_str = std::string(FUNCTION_NAME) + ": version " + + itos(version) + " not supported"; infostream << err_str << std::endl; throw SerializationError(err_str); } @@ -187,8 +185,8 @@ void NodeMetadataList::deSerialize(std::istream &is, } if (m_data.find(p) != m_data.end()) { warningstream << "NodeMetadataList::deSerialize(): " - << "already set data at position " << PP(p) - << ": Ignoring." << std::endl; + << "already set data at position " << PP(p) + << ": Ignoring." << std::endl; continue; } -- cgit v1.2.3