mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
add fS function to simplify string formatting with fmt::format
This commit is contained in:
parent
54ed42f884
commit
02e5030475
2 changed files with 15 additions and 1 deletions
|
@ -170,7 +170,8 @@ HEADERS += \
|
|||
src/widgets/splitcontainer.hpp \
|
||||
src/widgets/helper/droppreview.hpp \
|
||||
src/widgets/helper/splitcolumn.hpp \
|
||||
src/util/irchelpers.hpp
|
||||
src/util/irchelpers.hpp \
|
||||
src/util/helpers.hpp
|
||||
|
||||
|
||||
PRECOMPILED_HEADER =
|
||||
|
|
13
src/util/helpers.hpp
Normal file
13
src/util/helpers.hpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
template <typename... Args>
|
||||
auto fS(Args &&... args) -> decltype(fmt::format(std::forward<Args>(args)...))
|
||||
{
|
||||
return fmt::format(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
Loading…
Reference in a new issue