mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Optimizations
Remove extraneous 'c_str()' calls
This commit is contained in:
parent
aaf6e46871
commit
3683a9d108
@ -216,7 +216,7 @@ SQRESULT SQVM_WarningFunc(HSQUIRRELVM v, SQInteger a2, SQInteger a3, SQInteger*
|
||||
{
|
||||
wconsole->debug(vmStr);
|
||||
#ifdef DEDICATED
|
||||
g_pRConServer->Send(vmStr.c_str());
|
||||
g_pRConServer->Send(vmStr);
|
||||
#endif // DEDICATED
|
||||
}
|
||||
else
|
||||
@ -225,7 +225,7 @@ SQRESULT SQVM_WarningFunc(HSQUIRRELVM v, SQInteger a2, SQInteger a3, SQInteger*
|
||||
vmStrAnsi.append(svConstructor);
|
||||
wconsole->debug(vmStrAnsi);
|
||||
#ifdef DEDICATED
|
||||
g_pRConServer->Send(vmStrAnsi.c_str());
|
||||
g_pRConServer->Send(vmStrAnsi);
|
||||
#endif // DEDICATED
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ void DevMsg(eDLL_T context, const char* fmt, ...)
|
||||
va_end(args);
|
||||
}/////////////////////////////
|
||||
|
||||
svOut = sDLL_T[static_cast<int>(context)].c_str();
|
||||
svOut = sDLL_T[static_cast<int>(context)];
|
||||
svOut.append(szBuf);
|
||||
svOut = std::regex_replace(svOut, rxAnsiExp, "");
|
||||
|
||||
@ -118,12 +118,12 @@ void DevMsg(eDLL_T context, const char* fmt, ...)
|
||||
{
|
||||
wconsole->debug(svOut);
|
||||
#ifdef DEDICATED
|
||||
g_pRConServer->Send(svOut.c_str());
|
||||
g_pRConServer->Send(svOut);
|
||||
#endif // DEDICATED
|
||||
}
|
||||
else
|
||||
{
|
||||
svAnsiOut = sANSI_DLL_T[static_cast<int>(context)].c_str();
|
||||
svAnsiOut = sANSI_DLL_T[static_cast<int>(context)];
|
||||
svAnsiOut.append(szBuf);
|
||||
|
||||
char szNewLine = svAnsiOut.back();
|
||||
@ -133,7 +133,7 @@ void DevMsg(eDLL_T context, const char* fmt, ...)
|
||||
}
|
||||
wconsole->debug(svAnsiOut);
|
||||
#ifdef DEDICATED
|
||||
g_pRConServer->Send(svAnsiOut.c_str());
|
||||
g_pRConServer->Send(svAnsiOut);
|
||||
#endif // DEDICATED
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ void Warning(eDLL_T context, const char* fmt, ...)
|
||||
va_end(args);
|
||||
}/////////////////////////////
|
||||
|
||||
svOut = sDLL_T[static_cast<int>(context)].c_str();
|
||||
svOut = sDLL_T[static_cast<int>(context)];
|
||||
svOut.append(szBuf);
|
||||
svOut = std::regex_replace(svOut, rxAnsiExp, "");
|
||||
|
||||
@ -226,13 +226,13 @@ void Warning(eDLL_T context, const char* fmt, ...)
|
||||
{
|
||||
wconsole->debug(svOut);
|
||||
#ifdef DEDICATED
|
||||
g_pRConServer->Send(svOut.c_str());
|
||||
g_pRConServer->Send(svOut);
|
||||
#endif // DEDICATED
|
||||
}
|
||||
else
|
||||
{
|
||||
svAnsiOut = sANSI_DLL_T[static_cast<int>(context)].c_str();
|
||||
svAnsiOut.append(g_svYellowF.c_str());
|
||||
svAnsiOut = sANSI_DLL_T[static_cast<int>(context)];
|
||||
svAnsiOut.append(g_svYellowF);
|
||||
svAnsiOut.append(szBuf);
|
||||
|
||||
char szNewLine = svAnsiOut.back();
|
||||
@ -242,7 +242,7 @@ void Warning(eDLL_T context, const char* fmt, ...)
|
||||
}
|
||||
wconsole->debug(svAnsiOut);
|
||||
#ifdef DEDICATED
|
||||
g_pRConServer->Send(svAnsiOut.c_str());
|
||||
g_pRConServer->Send(svAnsiOut);
|
||||
#endif // DEDICATED
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ void Error(eDLL_T context, const char* fmt, ...)
|
||||
va_end(args);
|
||||
}/////////////////////////////
|
||||
|
||||
svOut = sDLL_T[static_cast<int>(context)].c_str();
|
||||
svOut = sDLL_T[static_cast<int>(context)];
|
||||
svOut.append(szBuf);
|
||||
svOut = std::regex_replace(svOut, rxAnsiExp, "");
|
||||
|
||||
@ -303,13 +303,13 @@ void Error(eDLL_T context, const char* fmt, ...)
|
||||
{
|
||||
wconsole->debug(svOut);
|
||||
#ifdef DEDICATED
|
||||
g_pRConServer->Send(svOut.c_str());
|
||||
g_pRConServer->Send(svOut);
|
||||
#endif // DEDICATED
|
||||
}
|
||||
else
|
||||
{
|
||||
svAnsiOut = sANSI_DLL_T[static_cast<int>(context)].c_str();
|
||||
svAnsiOut.append(g_svRedF.c_str());
|
||||
svAnsiOut = sANSI_DLL_T[static_cast<int>(context)];
|
||||
svAnsiOut.append(g_svRedF);
|
||||
svAnsiOut.append(szBuf);
|
||||
|
||||
char szNewLine = svAnsiOut.back();
|
||||
@ -319,7 +319,7 @@ void Error(eDLL_T context, const char* fmt, ...)
|
||||
}
|
||||
wconsole->debug(svAnsiOut);
|
||||
#ifdef DEDICATED
|
||||
g_pRConServer->Send(svAnsiOut.c_str());
|
||||
g_pRConServer->Send(svAnsiOut);
|
||||
#endif // DEDICATED
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user