1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-21 12:49:10 +00:00

Deprecate and remove xtl::format in favor of plString::Format

This commit is contained in:
2013-01-01 19:01:34 -08:00
parent f510b529f8
commit 60021923a2
33 changed files with 114 additions and 336 deletions

View File

@ -317,45 +317,28 @@ void plGenericType::SetVar(Types t, unsigned int size, void* val)
}
std::string plGenericType::GetAsStdString() const
plString plGenericType::GetAsString() const
{
std::string s;
switch (fType)
{
case kInt :
{
xtl::format(s,"%d",fI);
break;
}
return plString::Format("%d", fI);
case kBool :
case kUInt :
{
xtl::format(s,"%u",fType==kBool?fB:fU);
break;
}
return plString::Format("%u", fType==kBool?fB:fU);
case kFloat :
case kDouble :
{
xtl::format(s,"%f",fType==kDouble?fD:fF);
break;
}
return plString::Format("%f", fType==kDouble?fD:fF);
case kChar :
{
xtl::format(s,"%c",fC);
break;
}
return plString::Format("%c", fC);
case kAny :
case kString :
{
s = fS;
break;
}
return fS;
case kNone :
break;
default:
hsAssert(false,"plGenericType::GetAsStdString unknown type");
}
return s;
}
return plString::Null;
}