Host: Purge C format string error overloads

This commit is contained in:
Stenzek 2024-07-19 13:45:33 +10:00
parent 00ccea84b8
commit ca2a8f1e1f
No known key found for this signature in database
3 changed files with 1 additions and 22 deletions

View file

@ -1266,7 +1266,7 @@ void EmuThread::changeDiscFromPlaylist(quint32 index)
return;
if (!System::SwitchMediaSubImage(index))
Host::ReportFormattedErrorAsync("Error", "Failed to switch to subimage %u", index);
errorReported(tr("Error"), tr("Failed to switch to subimage %1").arg(index));
}
void EmuThread::setCheatEnabled(quint32 index, bool enabled)

View file

@ -125,22 +125,3 @@ void Host::ClearTranslationCache()
s_translation_string_cache_pos = 0;
s_translation_string_mutex.unlock();
}
void Host::ReportFormattedErrorAsync(std::string_view title, const char* format, ...)
{
std::va_list ap;
va_start(ap, format);
std::string message(StringUtil::StdStringFromFormatV(format, ap));
va_end(ap);
ReportErrorAsync(title, message);
}
bool Host::ConfirmFormattedMessage(std::string_view title, const char* format, ...)
{
std::va_list ap;
va_start(ap, format);
std::string message = StringUtil::StdStringFromFormatV(format, ap);
va_end(ap);
return ConfirmMessage(title, message);
}

View file

@ -31,11 +31,9 @@ void ReportFatalError(std::string_view title, std::string_view message);
/// Displays an asynchronous error on the UI thread, i.e. doesn't block the caller.
void ReportErrorAsync(std::string_view title, std::string_view message);
void ReportFormattedErrorAsync(std::string_view title, const char* format, ...);
/// Displays a synchronous confirmation on the UI thread, i.e. blocks the caller.
bool ConfirmMessage(std::string_view title, std::string_view message);
bool ConfirmFormattedMessage(std::string_view title, const char* format, ...);
/// Returns the user agent to use for HTTP requests.
std::string GetHTTPUserAgent();