mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-24 11:11:02 -07:00
Patch up for the libfmt change and update to c++20.Patch up for the
libfmt change and update to c++20.
This commit is contained in:
2
Makefile
2
Makefile
@@ -11,7 +11,7 @@ export BUILDTYPE
|
||||
ifeq ($(BUILDTYPE),windows)
|
||||
MINGW = i686-w64-mingw32-
|
||||
CC = $(MINGW)gcc
|
||||
CXX = $(MINGW)g++ -std=c++17
|
||||
CXX = $(MINGW)g++ -std=c++20
|
||||
CFLAGS += -g -O3
|
||||
CXXFLAGS += \
|
||||
-fext-numeric-literals \
|
||||
|
||||
@@ -48,7 +48,7 @@ struct ErrorException
|
||||
template <typename... Args>
|
||||
[[noreturn]] inline void error(fmt::string_view fstr, const Args&... args)
|
||||
{
|
||||
throw ErrorException{fmt::format(fstr, args...)};
|
||||
throw ErrorException{fmt::format(fmt::runtime(fstr), args...)};
|
||||
}
|
||||
|
||||
extern void warning(const std::string msg);
|
||||
@@ -56,7 +56,7 @@ extern void warning(const std::string msg);
|
||||
template <typename... Args>
|
||||
inline void warning(fmt::string_view fstr, const Args&... args)
|
||||
{
|
||||
warning(fmt::format(fstr, args...));
|
||||
warning(fmt::format(fmt::runtime(fstr), args...));
|
||||
}
|
||||
|
||||
template <class... Ts>
|
||||
|
||||
@@ -92,7 +92,7 @@ inline void log(const T& message)
|
||||
template <typename... Args>
|
||||
inline void log(fmt::string_view fstr, const Args&... args)
|
||||
{
|
||||
log(fmt::format(fstr, args...));
|
||||
log(fmt::format(fmt::runtime(fstr), args...));
|
||||
}
|
||||
|
||||
class LogRenderer
|
||||
|
||||
@@ -111,11 +111,11 @@ private:
|
||||
std::string sendrecv(const std::string& command)
|
||||
{
|
||||
if (_config.verbose())
|
||||
fmt::print(fmt::format("> {}\n", command));
|
||||
fmt::print("> {}\n", command);
|
||||
_serial->writeLine(command);
|
||||
auto r = _serial->readLine();
|
||||
if (_config.verbose())
|
||||
fmt::print(fmt::format("< {}\n", r));
|
||||
fmt::print("< {}\n", r);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ private:
|
||||
doCommand(command);
|
||||
std::string r = _serial->readLine();
|
||||
if (_config.verbose())
|
||||
fmt::print(fmt::format("<< {}\n", r));
|
||||
fmt::print("<< {}\n", r);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ static void draw_y_axis(Agg2D& painter,
|
||||
[&](double y, double v)
|
||||
{
|
||||
painter.line(x, y, x - 5, y);
|
||||
painter.text(x - 8, y + 5.0, fmt::format(format, v));
|
||||
painter.text(x - 8, y + 5.0, fmt::format(fmt::runtime(format), v));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ static void draw_x_axis(Agg2D& painter,
|
||||
[&](double x, double v)
|
||||
{
|
||||
painter.line(x, y, x, y + 5);
|
||||
painter.text(x, y + 18, fmt::format(format, v));
|
||||
painter.text(x, y + 18, fmt::format(fmt::runtime(format), v));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ bool failed = false;
|
||||
template <typename... Args>
|
||||
static void configError(fmt::string_view format_str, const Args&... args)
|
||||
{
|
||||
fmt::print(stderr, format_str, args...);
|
||||
fmt::print(stderr, fmt::runtime(format_str), args...);
|
||||
fputc('\n', stderr);
|
||||
failed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user