Remove varargs support from LOG_VULKAN_ERROR
Nothing currently uses it. It could theoretically be replaced with fmt support, but I don't think the LOG_VULKAN_ERROR macro is that useful and it'd be better to replace it with regular logging instead.
This commit is contained in:
parent
f9fe25291d
commit
ae7b14887b
|
@ -205,17 +205,10 @@ const char* VkResultToString(VkResult res)
|
|||
}
|
||||
|
||||
void LogVulkanResult(Common::Log::LogLevel level, const char* func_name, VkResult res,
|
||||
const char* msg, ...)
|
||||
const char* msg)
|
||||
{
|
||||
std::va_list ap;
|
||||
va_start(ap, msg);
|
||||
std::string real_msg = StringFromFormatV(msg, ap);
|
||||
va_end(ap);
|
||||
|
||||
real_msg = fmt::format("({}) {} ({}: {})", func_name, real_msg, static_cast<int>(res),
|
||||
VkResultToString(res));
|
||||
|
||||
GENERIC_LOG_FMT(Common::Log::LogType::VIDEO, level, "{}", real_msg);
|
||||
GENERIC_LOG_FMT(Common::Log::LogType::VIDEO, level, "({}) {} ({}: {})", func_name, msg,
|
||||
static_cast<int>(res), VkResultToString(res));
|
||||
}
|
||||
|
||||
} // namespace Vulkan
|
||||
|
|
|
@ -48,9 +48,9 @@ void UnloadVulkanLibrary();
|
|||
|
||||
const char* VkResultToString(VkResult res);
|
||||
void LogVulkanResult(Common::Log::LogLevel level, const char* func_name, VkResult res,
|
||||
const char* msg, ...);
|
||||
const char* msg);
|
||||
|
||||
#define LOG_VULKAN_ERROR(res, ...) \
|
||||
LogVulkanResult(Common::Log::LogLevel::LERROR, __func__, res __VA_OPT__(, ) __VA_ARGS__)
|
||||
#define LOG_VULKAN_ERROR(res, msg) \
|
||||
LogVulkanResult(Common::Log::LogLevel::LERROR, __func__, res, msg)
|
||||
|
||||
} // namespace Vulkan
|
||||
|
|
Loading…
Reference in New Issue