mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:40:05 +00:00
GCC doesn't implement <format> yet, use fmt
This commit is contained in:
parent
593010acc2
commit
31db9a4315
12 changed files with 27 additions and 28 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#include <scwx/qt/util/color.hpp>
|
||||
|
||||
#include <format>
|
||||
#include <fmt/format.h>
|
||||
#include <QColor>
|
||||
|
||||
namespace scwx
|
||||
|
|
@ -16,7 +16,7 @@ static const std::string logPrefix_ = "scwx::qt::util::color";
|
|||
|
||||
std::string ToArgbString(const boost::gil::rgba8_pixel_t& color)
|
||||
{
|
||||
return std::format(
|
||||
return fmt::format(
|
||||
"#{:02x}{:02x}{:02x}{:02x}", color[3], color[0], color[1], color[2]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <unordered_map>
|
||||
|
||||
#include <boost/timer/timer.hpp>
|
||||
#include <fmt/format.h>
|
||||
#include <imgui.h>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
|
|
@ -273,7 +274,7 @@ void FontImpl::CreateImGuiFont(QFile& fontFile,
|
|||
|
||||
// Assign name to font
|
||||
strncpy(fontConfig.Name,
|
||||
std::format("{}:{}", fileInfo.fileName().toStdString(), fontSize)
|
||||
fmt::format("{}:{}", fileInfo.fileName().toStdString(), fontSize)
|
||||
.c_str(),
|
||||
sizeof(fontConfig.Name));
|
||||
fontConfig.Name[sizeof(fontConfig.Name) - 1] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue