LGTM: Remove unused Time() function

The ConsoleSingleton::Time() function is flagged by LGTM for using
two different unsafe time-related functions. It is not called anywhere
in the current codebase, and is not exposed in the Python API, so was
removed rather than being repaired.
This commit is contained in:
Chris Hennes
2021-02-09 10:22:52 -06:00
committed by wmayer
parent 2834075d6a
commit a0bbb173f4
2 changed files with 0 additions and 18 deletions

View File

@@ -339,22 +339,6 @@ void ConsoleSingleton::Log( const char *pMsg, ... )
}
}
/** Delivers the time/date
* This method gives you a string with the actual time/date. You can
* use that for Log() calls to make timestamps.
* @return Const string with the date/time
*/
const char* ConsoleSingleton::Time(void)
{
struct tm *newtime;
time_t aclock;
time( &aclock ); // Get time in seconds
newtime = localtime( &aclock ); // Convert time to struct tm form
char* st = asctime( newtime );
st[24] = 0;
return st;
}
//**************************************************************************

View File

@@ -533,8 +533,6 @@ namespace Base {
void NotifyError (const char *sMsg);
void NotifyLog (const char *sMsg);
/// Delivers a time/date string
const char* Time(void);
/// Attaches an Observer to FCConsole
void AttachObserver(ILogger *pcObserver);
/// Detaches an Observer from FCConsole