Remove return value for in-place toLowerStr

openmw-38
scrawl 9 years ago
parent 4dd4c5394b
commit e3d3380c8c

@ -381,7 +381,7 @@ public:
bool isDeleted = false;
faction.load(esm, isDeleted);
std::string id = Misc::StringUtils::toLower(faction.mId);
std::string id = Misc::StringUtils::lowerCase(faction.mId);
for (std::map<std::string, int>::const_iterator it = faction.mReactions.begin(); it != faction.mReactions.end(); ++it)
{

@ -94,22 +94,22 @@ public:
}
/// Transforms input string to lower case w/o copy
static std::string &toLower(std::string &inout) {
static void toLower(std::string &inout) {
for (unsigned int i=0; i<inout.size(); ++i)
inout[i] = toLower(inout[i]);
return inout;
}
static std::string &toLowerStr(std::string &inout)
static void toLowerStr(std::string &inout)
{
return toLower(inout);
toLower(inout);
}
/// Returns lower case copy of input string
static std::string lowerCase(const std::string &in)
{
std::string out = in;
return toLower(out);
toLower(out);
return out;
}
};

@ -254,7 +254,7 @@ namespace
nextpos = std::distance(str.begin(), ++last);
}
std::string result = str.substr(pos, nextpos-pos);
textkeys.insert(std::make_pair(tk->list[i].time, Misc::StringUtils::toLower(result)));
textkeys.insert(std::make_pair(tk->list[i].time, Misc::StringUtils::lowerCase(result)));
pos = nextpos;
}

Loading…
Cancel
Save