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:
@ -252,10 +252,10 @@ void plNetClientMgr::SetNullSend(bool on)
|
||||
//
|
||||
// returns server time in the form "[m/d/y h:m:s]"
|
||||
//
|
||||
const char* plNetClientMgr::GetServerLogTimeAsString(std::string& timestamp) const
|
||||
const char* plNetClientMgr::GetServerLogTimeAsString(plString& timestamp) const
|
||||
{
|
||||
const plUnifiedTime st=GetServerTime();
|
||||
xtl::format(timestamp, "{%02d/%02d %02d:%02d:%02d}",
|
||||
timestamp = plString::Format("{%02d/%02d %02d:%02d:%02d}",
|
||||
st.GetMonth(), st.GetDay(), st.GetHour(), st.GetMinute(), st.GetSecond());
|
||||
return timestamp.c_str();
|
||||
}
|
||||
@ -265,10 +265,10 @@ const char* plNetClientMgr::GetServerLogTimeAsString(std::string& timestamp) con
|
||||
//
|
||||
const char* ProcessTab(const char* fmt)
|
||||
{
|
||||
static std::string s;
|
||||
static plString s;
|
||||
if (fmt && *fmt=='\t')
|
||||
{
|
||||
s = xtl::format(" %s", fmt);
|
||||
s = plString::Format(" %s", fmt);
|
||||
return s.c_str();
|
||||
}
|
||||
return fmt;
|
||||
@ -283,7 +283,7 @@ bool plNetClientMgr::Log(const char* str) const
|
||||
return true;
|
||||
|
||||
// prepend raw time
|
||||
std::string buf2 = xtl::format("%.2f %s", hsTimer::GetSeconds(), ProcessTab(str));
|
||||
plString buf2 = plString::Format("%.2f %s", hsTimer::GetSeconds(), ProcessTab(str));
|
||||
|
||||
if ( GetConsoleOutput() )
|
||||
hsStatusMessage(buf2.c_str());
|
||||
|
@ -348,7 +348,7 @@ public:
|
||||
|
||||
// time converters
|
||||
plUnifiedTime GetServerTime() const;
|
||||
const char* GetServerLogTimeAsString(std::string& ts) const;
|
||||
const char* GetServerLogTimeAsString(plString& ts) const;
|
||||
double GetCurrentAgeElapsedSeconds() const;
|
||||
float GetCurrentAgeTimeOfDayPercent() const;
|
||||
|
||||
|
@ -437,7 +437,7 @@ int plNetClientMgr::SendMsg(plNetMessage* msg)
|
||||
if (plNetMsgGameMessage::ConvertNoRef(msg))
|
||||
SetFlagsBit(kSendingActions);
|
||||
|
||||
plCheckNetMgrResult_ValReturn(ret,(char*)xtl::format("Failed to send %s, NC ret=%d",
|
||||
plCheckNetMgrResult_ValReturn(ret, plString::Format("Failed to send %s, NC ret=%d",
|
||||
msg->ClassName(), ret).c_str());
|
||||
|
||||
return ret;
|
||||
|
@ -250,15 +250,15 @@ MSG_HANDLER_DEFN(plNetClientMsgHandler,plNetMsgSDLState)
|
||||
plStateDataRecord* sdRec = des ? new plStateDataRecord(des) : nil;
|
||||
if (!sdRec || sdRec->GetDescriptor()->GetVersion()!=ver)
|
||||
{
|
||||
std::string err;
|
||||
plString err;
|
||||
if (!sdRec)
|
||||
err = xtl::format( "SDL descriptor %s missing, v=%d", descName.c_str(), ver);
|
||||
err = plString::Format( "SDL descriptor %s missing, v=%d", descName.c_str(), ver);
|
||||
else
|
||||
err = xtl::format( "SDL descriptor %s, version mismatch, server v=%d, client v=%d",
|
||||
err = plString::Format( "SDL descriptor %s, version mismatch, server v=%d, client v=%d",
|
||||
descName.c_str(), ver, sdRec->GetDescriptor()->GetVersion());
|
||||
|
||||
hsAssert(false, err.c_str());
|
||||
nc->ErrorMsg(const_cast<char*>(err.c_str()));
|
||||
nc->ErrorMsg(err.c_str());
|
||||
|
||||
// Post Quit message
|
||||
nc->QueueDisableNet(true, "SDL Desc Problem");
|
||||
|
Reference in New Issue
Block a user