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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user