1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 03:09:13 +00:00

Convert many of the now-deprecated plString::Format calls to plFormat

This commit is contained in:
2014-05-24 23:46:54 -07:00
parent 89a9bbb3c4
commit 1debf8180b
98 changed files with 404 additions and 413 deletions

View File

@ -102,7 +102,7 @@ bool plConfigInfoLogging::GetValue(double& retval, const plString & section, con
bool plConfigInfoLogging::GetAllValues(std::vector<plString>& values, const plString & section, const plString & key, const plString & desc)
{
plString descwdef = plString::Format("%s # %s","\"Multiple Entries\"",desc.c_str());
plString descwdef = plFormat("\"Multiple Entries\" # {}", desc);
fLog.AddValue(section,key,descwdef,kReplaceIfExists);
values = fConfigInfo.GetAllValues(section,key);

View File

@ -87,7 +87,7 @@ bool plKeysAndValues::KeyHasValue(const plString & key, const plString & value)
bool plKeysAndValues::KeyHasValue(const plString & key, int value)
{
return KeyHasValue(key, plString::Format("%d", value));
return KeyHasValue(key, plFormat("{}", value));
}
bool plKeysAndValues::KeyHasValue(const plString & key, double value)
@ -116,7 +116,7 @@ bool plKeysAndValues::AddValue(const plString & key, const plString & value, KAd
bool plKeysAndValues::AddValue(const plString & key, int value, KAddValueMode mode)
{
return AddValue(key, plString::Format("%d", value), mode);
return AddValue(key, plFormat("{}", value), mode);
}
bool plKeysAndValues::AddValue(const plString & key, double value, KAddValueMode mode)
@ -139,7 +139,7 @@ bool plKeysAndValues::SetValue(const plString & key, const plString & value)
bool plKeysAndValues::SetValue(const plString & key, int value)
{
return SetValue(key, plString::Format("%d", value));
return SetValue(key, plFormat("{}", value));
}
bool plKeysAndValues::SetValue(const plString & key, double value)
@ -160,17 +160,17 @@ plString plKeysAndValues::GetValue(const plString & key, const plString & defval
uint32_t plKeysAndValues::GetValue(const plString & key, uint32_t defval, bool * outFound) const
{
return strtoul(GetValue(key, plString::Format("%ul", defval), outFound).c_str(), nil, 0);
return GetValue(key, plFormat("{}", defval), outFound).ToUInt();
}
int plKeysAndValues::GetValue(const plString & key, int defval, bool * outFound) const
{
return atol(GetValue(key, plString::Format("%d", defval), outFound).c_str());
return GetValue(key, plFormat("{}", defval), outFound).ToInt();
}
double plKeysAndValues::GetValue(const plString & key, double defval, bool * outFound) const
{
return atof(GetValue(key, plString::Format("%f", defval), outFound).c_str());
return GetValue(key, plString::Format("%f", defval), outFound).ToDouble();
}
std::vector<plString> plKeysAndValues::GetAllValues(const plString & key)