summaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-20 19:37:29 +0200
committerGitHub <noreply@github.com>2017-08-20 19:37:29 +0200
commitae9b5e00989756bb676429530dfe81039009001c (patch)
tree119c9ac4b886c24d42f418e21e4175a942eb95ff /src/nodedef.cpp
parentc8d3d1133945138108aa195e6b3c93b07c6e4fa0 (diff)
downloadminetest-ae9b5e00989756bb676429530dfe81039009001c.tar.gz
minetest-ae9b5e00989756bb676429530dfe81039009001c.tar.bz2
minetest-ae9b5e00989756bb676429530dfe81039009001c.zip
Modernize code: very last fixes (#6290)
Last modernization fixes
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r--src/nodedef.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 21522955e..dd3ceb021 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -159,13 +159,13 @@ void NodeBox::deSerialize(std::istream &is)
}
else if (type == NODEBOX_CONNECTED)
{
-#define READBOXES(box) do { \
+#define READBOXES(box) { \
count = readU16(is); \
(box).reserve(count); \
while (count--) { \
v3f min = readV3F1000(is); \
v3f max = readV3F1000(is); \
- (box).emplace_back(min, max); }; } while (0)
+ (box).emplace_back(min, max); }; }
u16 count;
@@ -1958,7 +1958,7 @@ bool NodeResolver::getIdFromNrBacklog(content_t *result_out,
std::string name = m_nodenames[m_nodenames_idx++];
bool success = m_ndef->getId(name, c);
- if (!success && node_alt != "") {
+ if (!success && !node_alt.empty()) {
name = node_alt;
success = m_ndef->getId(name, c);
}