summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2016-03-19 12:08:24 -0400
committerShadowNinja <shadowninja@minetest.net>2016-03-19 21:27:57 -0400
commit93887043d9443ba6627fea68921994d0f1896517 (patch)
tree7199a98377b19afc01517ab795bc4d6dfa073130 /src/inventory.cpp
parenteb7db21d50f866d1e847d7556f83995294a7e54f (diff)
downloadminetest-93887043d9443ba6627fea68921994d0f1896517.tar.gz
minetest-93887043d9443ba6627fea68921994d0f1896517.tar.bz2
minetest-93887043d9443ba6627fea68921994d0f1896517.zip
Clean up Strfnd
Changes: * Fix indentation. * Pass strings by const reference. * Merge Strfnd and WStrfnd into one class instead of copying them. * Remove trailing spaces. * Fix variable names. * Move to util. * Other miscellaneous style fixes.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index e89993e63..fce8575e7 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <sstream>
#include "log.h"
#include "itemdef.h"
-#include "strfnd.h"
+#include "util/strfnd.h"
#include "content_mapnode.h" // For loading legacy MaterialItems
#include "nameidmapping.h" // For loading legacy MaterialItems
#include "util/serialize.h"
@@ -218,7 +218,7 @@ void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef)
Strfnd fnd(all);
fnd.next("\"");
// If didn't skip to end, we have ""s
- if(!fnd.atend()){
+ if(!fnd.at_end()){
name = fnd.next("\"");
} else { // No luck, just read a word then
fnd.start(all);
@@ -246,7 +246,7 @@ void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef)
Strfnd fnd(all);
fnd.next("\"");
// If didn't skip to end, we have ""s
- if(!fnd.atend()){
+ if(!fnd.at_end()){
name = fnd.next("\"");
} else { // No luck, just read a word then
fnd.start(all);