mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
cpp std lib depedencies removed
This commit is contained in:
parent
d3839db6f8
commit
f4a729e85a
@ -272,7 +272,7 @@ void UTIL_FakeClientCommand(edict_t *pEdict, const char *cmd, const char *arg1,
|
||||
g_fakecmd.fake = false;
|
||||
}
|
||||
|
||||
std::string g_UTIL_LogFile;
|
||||
String g_UTIL_LogFile;
|
||||
|
||||
void UTIL_MakeNewLogFile()
|
||||
{
|
||||
@ -292,8 +292,8 @@ void UTIL_MakeNewLogFile()
|
||||
int i = 0;
|
||||
while (true)
|
||||
{
|
||||
g_UTIL_LogFile = build_pathname("%s/L%02d%02d%03d.log", g_log_dir.str(), curTime->tm_mon + 1, curTime->tm_mday, i);
|
||||
FILE *pTmpFile = fopen(g_UTIL_LogFile.c_str(), "r"); // open for reading to check whether the file exists
|
||||
g_UTIL_LogFile.set(build_pathname("%s/L%02d%02d%03d.log", g_log_dir.str(), curTime->tm_mon + 1, curTime->tm_mday, i));
|
||||
FILE *pTmpFile = fopen(g_UTIL_LogFile.str(), "r"); // open for reading to check whether the file exists
|
||||
if (!pTmpFile)
|
||||
break;
|
||||
fclose(pTmpFile);
|
||||
@ -322,7 +322,7 @@ void UTIL_Log(const char *fmt, ...)
|
||||
strftime(date, 31, "%m/%d/%Y - %H:%M:%S", curTime);
|
||||
|
||||
// log msg now
|
||||
FILE *pF = fopen(g_UTIL_LogFile.c_str(), "a+");
|
||||
FILE *pF = fopen(g_UTIL_LogFile.str(), "a+");
|
||||
if (!pF)
|
||||
return; // don't try to create a new logfile to prevent recursion crashes if there is an unforseen error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user