aboutsummaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r--src/nodedef.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index d1eb12f3e..e2a222ed3 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -354,12 +354,12 @@ void ContentFeatures::reset()
NOTE: Most of this is always overridden by the default values given
in builtin.lua
*/
- name = "";
+ name.clear();
groups.clear();
// Unknown nodes can be dug
groups["dig_immediate"] = 2;
drawtype = NDT_NORMAL;
- mesh = "";
+ mesh.clear();
#ifndef SERVER
for (auto &i : mesh_ptr)
i = NULL;
@@ -387,9 +387,9 @@ void ContentFeatures::reset()
leveled = 0;
leveled_max = LEVELED_MAX;
liquid_type = LIQUID_NONE;
- liquid_alternative_flowing = "";
+ liquid_alternative_flowing.clear();
liquid_alternative_flowing_id = CONTENT_IGNORE;
- liquid_alternative_source = "";
+ liquid_alternative_source.clear();
liquid_alternative_source_id = CONTENT_IGNORE;
liquid_viscosity = 0;
liquid_renewable = true;
@@ -410,7 +410,7 @@ void ContentFeatures::reset()
connects_to_ids.clear();
connect_sides = 0;
color = video::SColor(0xFFFFFFFF);
- palette_name = "";
+ palette_name.clear();
palette = NULL;
node_dig_prediction = "air";
move_resistance = 0;
@@ -1355,7 +1355,7 @@ void NodeDefManager::eraseIdFromGroups(content_t id)
content_t NodeDefManager::set(const std::string &name, const ContentFeatures &def)
{
// Pre-conditions
- assert(name != "");
+ assert(!name.empty());
assert(name != "ignore");
assert(name == def.name);
@@ -1395,7 +1395,7 @@ content_t NodeDefManager::set(const std::string &name, const ContentFeatures &de
content_t NodeDefManager::allocateDummy(const std::string &name)
{
- assert(name != ""); // Pre-condition
+ assert(!name.empty()); // Pre-condition
ContentFeatures f;
f.name = name;
return set(name, f);
@@ -1405,7 +1405,7 @@ content_t NodeDefManager::allocateDummy(const std::string &name)
void NodeDefManager::removeNode(const std::string &name)
{
// Pre-condition
- assert(name != "");
+ assert(!name.empty());
// Erase name from name ID mapping
content_t id = CONTENT_IGNORE;