Use std::format instead of fmt
The formatting used by this repository can be accomplished using
std::format instead of fmt, so use it and eliminate the dependency.
Change-Id: I6fb0dd7d7f032bb6f8c95830bd5849be212a6049
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/main.cpp b/main.cpp
index e526c3c..66af297 100644
--- a/main.cpp
+++ b/main.cpp
@@ -22,12 +22,12 @@
#include "sensorhelper.hpp"
#include "views.hpp"
-#include <fmt/printf.h>
#include <ncurses.h>
#include <stdio.h>
#include <unistd.h>
#include <cassert>
+#include <format>
#include <iomanip>
#include <mutex>
#include <sstream>
@@ -171,7 +171,7 @@
std::string FloatToString(float value)
{
- return fmt::sprintf("%.2f", value);
+ return std::format("{:.2f}", value);
}
void DBusTopRefresh()
diff --git a/meson.build b/meson.build
index 833bcbb..828c131 100644
--- a/meson.build
+++ b/meson.build
@@ -38,7 +38,6 @@
dependency('sdbusplus'),
dependency('ncurses'),
dependency('threads'),
- dependency('fmt')
],
install: true,
install_dir: bindir
diff --git a/subprojects/fmt.wrap b/subprojects/fmt.wrap
deleted file mode 100644
index 6847ae5..0000000
--- a/subprojects/fmt.wrap
+++ /dev/null
@@ -1,3 +0,0 @@
-[wrap-git]
-url = https://github.com/fmtlib/fmt
-revision = HEAD