mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-26 18:15:42 -04:00
Misc: Fix a couple of fmt errors
This commit is contained in:
parent
0af059aae2
commit
333c9fdf6f
@ -329,18 +329,25 @@ ALWAYS_INLINE void SmallStringBase::fmt(fmt::format_string<T...> fmt, T&&... arg
|
|||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<>
|
#define MAKE_FORMATTER(type) \
|
||||||
struct fmt::formatter<SmallStringBase>
|
template<> \
|
||||||
{
|
struct fmt::formatter<type> \
|
||||||
template<typename ParseContext>
|
{ \
|
||||||
constexpr auto parse(ParseContext& ctx)
|
template<typename ParseContext> \
|
||||||
{
|
constexpr auto parse(ParseContext& ctx) \
|
||||||
return ctx.begin();
|
{ \
|
||||||
}
|
return ctx.begin(); \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
template<typename FormatContext> \
|
||||||
|
auto format(const type& str, FormatContext& ctx) \
|
||||||
|
{ \
|
||||||
|
return fmt::format_to(ctx.out(), "{}", str.view()); \
|
||||||
|
} \
|
||||||
|
};
|
||||||
|
|
||||||
template<typename FormatContext>
|
MAKE_FORMATTER(TinyString);
|
||||||
auto format(const SmallStringBase& str, FormatContext& ctx)
|
MAKE_FORMATTER(SmallString);
|
||||||
{
|
MAKE_FORMATTER(LargeString);
|
||||||
return fmt::format_to(ctx.out(), "{}", str.view());
|
|
||||||
}
|
#undef MAKE_FORMATTER
|
||||||
};
|
|
||||||
|
@ -358,9 +358,9 @@ GLuint OpenGLDevice::CompileProgram(const GPUPipeline::GraphicsConfig& plconfig)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
glBindAttribLocation(
|
glBindAttribLocation(program_id, i,
|
||||||
program_id, i,
|
TinyString::from_fmt("{}{}", semantic_vars[static_cast<u8>(va.semantic.GetValue())],
|
||||||
TinyString::from_fmt("{}{}", semantic_vars[static_cast<u8>(va.semantic.GetValue())], va.semantic_index));
|
static_cast<u8>(va.semantic_index)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user