diff options
author | ShadowNinja <shadowninja@minetest.net> | 2016-03-19 12:08:24 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2016-03-19 21:27:57 -0400 |
commit | 93887043d9443ba6627fea68921994d0f1896517 (patch) | |
tree | 7199a98377b19afc01517ab795bc4d6dfa073130 /src/subgame.cpp | |
parent | eb7db21d50f866d1e847d7556f83995294a7e54f (diff) | |
download | hax-minetest-server-93887043d9443ba6627fea68921994d0f1896517.tar.gz hax-minetest-server-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 '')
-rw-r--r-- | src/subgame.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/subgame.cpp b/src/subgame.cpp index 20f5116e2..7e9a0b368 100644 --- a/src/subgame.cpp +++ b/src/subgame.cpp @@ -22,7 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "filesys.h" #include "settings.h" #include "log.h" -#include "strfnd.h" +#include "util/strfnd.h" #include "defaultsettings.h" // for override_default_settings #include "mapgen.h" // for MapgenParams #include "util/string.h" @@ -79,7 +79,7 @@ SubgameSpec findSubgame(const std::string &id) Strfnd search_paths(getSubgamePathEnv()); - while (!search_paths.atend()) { + while (!search_paths.at_end()) { std::string path = search_paths.next(PATH_DELIM); find_paths.push_back(GameFindPath( path + DIR_DELIM + id, false)); @@ -153,7 +153,7 @@ std::set<std::string> getAvailableGameIds() Strfnd search_paths(getSubgamePathEnv()); - while (!search_paths.atend()) + while (!search_paths.at_end()) gamespaths.insert(search_paths.next(PATH_DELIM)); for (std::set<std::string>::const_iterator i = gamespaths.begin(); @@ -230,7 +230,7 @@ std::vector<WorldSpec> getAvailableWorlds() Strfnd search_paths(getWorldPathEnv()); - while (!search_paths.atend()) + while (!search_paths.at_end()) worldspaths.insert(search_paths.next(PATH_DELIM)); worldspaths.insert(porting::path_user + DIR_DELIM + "worlds"); |