mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Deprecate and remove xtl::format in favor of plString::Format
This commit is contained in:
@ -331,7 +331,7 @@ void plDispatch::IMsgDispatch()
|
||||
if (plNetObjectDebuggerBase::GetInstance()->IsDebugObject(ko))
|
||||
{
|
||||
hsLogEntry(plNetObjectDebuggerBase::GetInstance()->LogMsg(
|
||||
xtl::format("<RCV> object:%s, GameMessage %s st=%.3f rt=%.3f",
|
||||
plString::Format("<RCV> object:%s, GameMessage %s st=%.3f rt=%.3f",
|
||||
ko->GetKeyName().c_str(), msg->ClassName(), hsTimer::GetSysSeconds(), hsTimer::GetSeconds()).c_str()));
|
||||
}
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ int plMsgStdStringHelper::Peek(std::string & stringref, hsStream* stream, const
|
||||
stringref.resize(strlen);
|
||||
if (strlen){
|
||||
stream->LogRead(strlen,(void*)stringref.data(),"StdString");
|
||||
stream->LogStringString(xtl::format("Value: %s", stringref.data()).c_str());
|
||||
stream->LogStringString(plString::Format("Value: %s", stringref.data()).c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -302,7 +302,7 @@ int plMsgStdStringHelper::PeekBig(std::string & stringref, hsStream* stream, co
|
||||
stringref.resize(bufsz);
|
||||
if (bufsz){
|
||||
stream->LogRead(bufsz,(void*)stringref.data(),"StdString");
|
||||
stream->LogStringString(xtl::format("Value: %s", stringref.data()).c_str());
|
||||
stream->LogStringString(plString::Format("Value: %s", stringref.data()).c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -357,7 +357,7 @@ int plMsgCStringHelper::Peek(char *& str, hsStream* stream, const uint32_t peekO
|
||||
str[strlen] = '\0';
|
||||
if (strlen) {
|
||||
stream->LogRead(strlen,str,"CString");
|
||||
stream->LogStringString(xtl::format("Value: %s",str).c_str());
|
||||
stream->LogStringString(plString::Format("Value: %s",str).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -157,8 +157,8 @@ public:
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Helpers for reading/writing these types:
|
||||
// plString
|
||||
// std::string
|
||||
// xtl::istring
|
||||
// c strings (char *)
|
||||
// c arrays (type [])
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
void SetType(Types t) { fType=t; }
|
||||
uint8_t GetType( void ) const { return fType; }
|
||||
|
||||
std::string GetAsStdString() const;
|
||||
plString GetAsString() const;
|
||||
|
||||
// implicit set
|
||||
void Set( int32_t i ) { fI = i; fType = kInt; }
|
||||
|
@ -192,7 +192,7 @@ public:
|
||||
virtual int IsLocallyOwned(const plUoid&) const { hsAssert(false, "stub"); return 0; }
|
||||
virtual plNetGroupId GetEffectiveNetGroup(const plSynchedObject* obj) const { hsAssert(false, "stub"); return plNetGroup::kNetGroupUnknown; }
|
||||
virtual int Update(double secs) { return hsOK;}
|
||||
virtual const char* GetServerLogTimeAsString(std::string& ts) const { hsAssert(false, "stub"); return nil; }
|
||||
virtual const char* GetServerLogTimeAsString(plString& ts) const { hsAssert(false, "stub"); return nil; }
|
||||
virtual plUoid GetAgeSDLObjectUoid(const char* ageName) const { hsAssert(false, "stub"); return plUoid(); }
|
||||
virtual void StayAlive(double secs) {}
|
||||
virtual void QueueDisableNet( bool showDlg, const char msg[] ) {}
|
||||
|
Reference in New Issue
Block a user