mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Deprecate and remove xtl::format in favor of plString::Format
This commit is contained in:
@ -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