Add more printflike macros.

This commit is contained in:
C.W. Betts
2021-03-29 13:56:19 -06:00
parent a6617e6297
commit fb7a8886f1
7 changed files with 24 additions and 23 deletions

View File

@ -148,7 +148,7 @@ void DisassembleAndLog(u32 addr);
void DisassembleAndPrint(u32 addr, u32 instructions_before, u32 instructions_after);
// Write to CPU execution log file.
void WriteToExecutionLog(const char* format, ...);
void WriteToExecutionLog(const char* format, ...) printflike(1, 2);
// Trace Routines
bool IsTraceEnabled();

View File

@ -64,23 +64,23 @@ public:
virtual void ReportDebuggerMessage(const char* message);
virtual bool ConfirmMessage(const char* message);
void ReportFormattedError(const char* format, ...);
void ReportFormattedMessage(const char* format, ...);
void ReportFormattedDebuggerMessage(const char* format, ...);
bool ConfirmFormattedMessage(const char* format, ...);
void ReportFormattedError(const char* format, ...) printflike(2, 3);
void ReportFormattedMessage(const char* format, ...) printflike(2, 3);
void ReportFormattedDebuggerMessage(const char* format, ...) printflike(2, 3);
bool ConfirmFormattedMessage(const char* format, ...) printflike(2, 3);
/// Adds OSD messages, duration is in seconds.
virtual void AddOSDMessage(std::string message, float duration = 2.0f);
void AddFormattedOSDMessage(float duration, const char* format, ...);
void AddFormattedOSDMessage(float duration, const char* format, ...) printflike(3, 4);
/// Returns the base user directory path.
ALWAYS_INLINE const std::string& GetUserDirectory() const { return m_user_directory; }
/// Returns a path relative to the user directory.
std::string GetUserDirectoryRelativePath(const char* format, ...) const;
std::string GetUserDirectoryRelativePath(const char* format, ...) const printflike(2, 3);
/// Returns a path relative to the application directory (for system files).
std::string GetProgramDirectoryRelativePath(const char* format, ...) const;
std::string GetProgramDirectoryRelativePath(const char* format, ...) const printflike(2, 3);
/// Returns a string which can be used as part of a filename, based on the current date/time.
static TinyString GetTimestampStringForFileName();