1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Modernize code: very last fixes (#6290)

Last modernization fixes
This commit is contained in:
Loïc Blot 2017-08-20 19:37:29 +02:00 committed by GitHub
parent c8d3d11339
commit ae9b5e0098
31 changed files with 428 additions and 523 deletions

View file

@ -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);
}