1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-21 12:49:10 +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

@ -319,7 +319,7 @@ bool plStateDataRecord::Read(hsStream* s, float timeConvert, uint32_t readOption
// convert to latest descriptor
// Only really need to do this the first time this descriptor is read...
plStateDescriptor* latestDesc=plSDLMgr::GetInstance()->FindDescriptor(fDescriptor->GetName(), plSDL::kLatestVersion);
hsAssert( latestDesc, plString::Format("Failed to find latest sdl descriptor for: %s", fDescriptor->GetName().c_str() ).c_str() );
hsAssert(latestDesc, plFormat("Failed to find latest sdl descriptor for: {}", fDescriptor->GetName()).c_str());
bool forceConvert = (readOptions&plSDL::kForceConvert)!=0;
if ( latestDesc && ( forceConvert || ( fDescriptor->GetVersion()!=latestDesc->GetVersion() ) ) )
{
@ -493,14 +493,14 @@ void plStateDataRecord::UpdateFrom(const plStateDataRecord& other, uint32_t writ
if ( GetDescriptor()->GetVersion()!=other.GetDescriptor()->GetVersion() )
{
plStateDescriptor* sd=plSDLMgr::GetInstance()->FindDescriptor( other.GetDescriptor()->GetName(), other.GetDescriptor()->GetVersion() );
hsAssert( sd, plString::Format( "Failed to find sdl descriptor %s,%d. Missing legacy descriptor?",
other.GetDescriptor()->GetName().c_str(), other.GetDescriptor()->GetVersion() ).c_str() );
hsAssert(sd, plFormat("Failed to find sdl descriptor {},{}. Missing legacy descriptor?",
other.GetDescriptor()->GetName(), other.GetDescriptor()->GetVersion()).c_str());
ConvertTo( sd );
}
hsAssert(other.GetDescriptor()==fDescriptor,
plString::Format("descriptor mismatch in UpdateFromDirty, SDL=%s,%s version %d %d",
GetDescriptor()->GetName().c_str(), other.GetDescriptor()->GetName().c_str(),
plFormat("descriptor mismatch in UpdateFromDirty, SDL={},{} version {} {}",
GetDescriptor()->GetName(), other.GetDescriptor()->GetName(),
GetDescriptor()->GetVersion(), other.GetDescriptor()->GetVersion()).c_str());
bool dirtyOnly = (writeOptions & plSDL::kDirtyOnly);
@ -545,9 +545,9 @@ void plStateDataRecord::FlagDifferentState(const plStateDataRecord& other)
}
else
{
hsAssert(false, plString::Format("descriptor mismatch in FlagDifferentState, mine %s %d, other %s %d",
fDescriptor->GetName().c_str(), fDescriptor->GetVersion(),
other.GetDescriptor()->GetName().c_str(), other.GetDescriptor()->GetVersion()).c_str());
hsAssert(false, plFormat("descriptor mismatch in FlagDifferentState, mine {} {}, other {} {}",
fDescriptor->GetName(), fDescriptor->GetVersion(),
other.GetDescriptor()->GetName(), other.GetDescriptor()->GetVersion()).c_str());
}
}
@ -599,9 +599,9 @@ void plStateDataRecord::FlagNewerState(const plStateDataRecord& other, bool resp
}
else
{
hsAssert(false, plString::Format("descriptor mismatch in FlagNewerState, mine %s %d, other %s %d",
fDescriptor->GetName().c_str(), fDescriptor->GetVersion(),
other.GetDescriptor()->GetName().c_str(), other.GetDescriptor()->GetVersion()).c_str());
hsAssert(false, plFormat("descriptor mismatch in FlagNewerState, mine {} {}, other {} {}",
fDescriptor->GetName(), fDescriptor->GetVersion(),
other.GetDescriptor()->GetName(), other.GetDescriptor()->GetVersion()).c_str());
}
}
@ -744,9 +744,9 @@ void plStateDataRecord::DumpToObjectDebugger(const char* msg, bool dirtyOnly, in
int numVars = dirtyOnly ? GetNumDirtyVars() : GetNumUsedVars();
int numSDVars = dirtyOnly ? GetNumDirtySDVars() : GetNumUsedSDVars();
dbg->LogMsg(plString::Format("%s", fAssocObject.IsValid() ? fAssocObject.GetObjectName().c_str() : " ").c_str());
dbg->LogMsg(fAssocObject.IsValid() ? fAssocObject.GetObjectName().c_str() : " ");
if (msg)
dbg->LogMsg(plString::Format("%s%s", pad.c_str(),msg).c_str());
dbg->LogMsg(plFormat("{}{}", pad, msg).c_str());
dbg->LogMsg(plString::Format("%sSDR(%p), desc=%s, showDirty=%d, numVars=%d, vol=%d",
pad.c_str(), this, fDescriptor->GetName().c_str(), dirtyOnly, numVars+numSDVars, fFlags&kVolatile).c_str());
@ -780,12 +780,12 @@ void plStateDataRecord::DumpToStream(hsStream* stream, const char* msg, bool dir
int numVars = dirtyOnly ? GetNumDirtyVars() : GetNumUsedVars();
int numSDVars = dirtyOnly ? GetNumDirtySDVars() : GetNumUsedSDVars();
plString logStr = plString::Format("%s", fAssocObject.IsValid() ? fAssocObject.GetObjectName().c_str() : " ");
plString logStr = fAssocObject.IsValid() ? fAssocObject.GetObjectName() : " ";
stream->Write(logStr.GetSize(), logStr.c_str());
if (msg)
{
logStr = plString::Format("%s%s", pad.c_str(),msg);
logStr = plFormat("{}{}", pad, msg);
stream->Write(logStr.GetSize(), logStr.c_str());
}