mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
ShaderGenCommon: Rename WriteFmt() to Write()
Now that we've converted all of the shader generators over to using fmt, we can drop the old Write() member function and perform a rename operation on the WriteFmt() to turn it into the new Write() function. All changes within this are the removal of a <cstdarg> header, since the previous printf-based Write() required it, and renaming. No functional changes are made at all.
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
@ -104,21 +103,9 @@ public:
|
||||
ShaderCode() { m_buffer.reserve(16384); }
|
||||
const std::string& GetBuffer() const { return m_buffer; }
|
||||
|
||||
// Deprecated: Writes format strings using traditional printf format strings.
|
||||
void Write(const char* fmt, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 2, 3)))
|
||||
#endif
|
||||
{
|
||||
va_list arglist;
|
||||
va_start(arglist, fmt);
|
||||
m_buffer += StringFromFormatV(fmt, arglist);
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
// Writes format strings using fmtlib format strings.
|
||||
template <typename... Args>
|
||||
void WriteFmt(std::string_view format, Args&&... args)
|
||||
void Write(std::string_view format, Args&&... args)
|
||||
{
|
||||
fmt::format_to(std::back_inserter(m_buffer), format, std::forward<Args>(args)...);
|
||||
}
|
||||
|
Reference in New Issue
Block a user