Replace fmt::format with std::format

This commit is contained in:
2024-09-18 16:42:48 +02:00
parent 7e17dcf7d8
commit 89f1253298
4 changed files with 11 additions and 9 deletions

View File

@ -107,7 +107,6 @@ set(dependencies
espchrono
espcpputils
espwifistack
fmt
TFT_eSPI
esptftlib
espfontlib

View File

@ -1,7 +1,9 @@
#include "changevaluedisplay.h"
// system includes
#include <format>
// 3rdparty lib includes
#include <fmt/core.h>
#include <fontrenderer.h>
// local includes
@ -38,6 +40,6 @@ void ChangeValueDisplay<float>::redraw(TftInterface &tft)
{
Base::redraw(tft);
m_valueLabel.redraw(tft, fmt::format("{:.02f}", m_value), TFT_WHITE, TFT_BLACK, 7);
m_valueLabel.redraw(tft, std::format("{:.02f}", m_value), TFT_WHITE, TFT_BLACK, 7);
}
} // namespace espgui

View File

@ -4,7 +4,6 @@
#include <esp_log.h>
// 3rdparty lib includes
#include <fmt/core.h>
#include <strutils.h>
#include <fontrenderer.h>

View File

@ -1,7 +1,9 @@
#pragma once
// system includes
#include <format>
// 3rdparty lib includes
#include <fmt/core.h>
#include <strutils.h>
#include <espstrutils.h>
#include <espwifiutils.h>
@ -26,7 +28,7 @@ struct TextWithValueHelper : public Taccessor, public virtual TextInterface
using espchrono::toString;
using wifi_stack::toString;
return fmt::format("{} {}", Tprefix, richTextEscape(toString(Taccessor::getValue())));
return std::format("{} {}", Tprefix, richTextEscape(toString(Taccessor::getValue())));
}
};
@ -42,7 +44,7 @@ struct ChangeableTextWithValueHelper : public Taccessor, public virtual TextInte
using espchrono::toString;
using wifi_stack::toString;
return fmt::format("{} {}", m_prefix, richTextEscape(toString(Taccessor::getValue())));
return std::format("{} {}", m_prefix, richTextEscape(toString(Taccessor::getValue())));
}
const std::string &prefix() const { return m_prefix; }
@ -65,7 +67,7 @@ struct TextWithHighlightedValueHelper : public Taccessor, public virtual TextInt
using espchrono::toString;
using wifi_stack::toString;
return fmt::format("{} {}{}", Tprefix, Tguilib_color, richTextEscape(toString(Taccessor::getValue())));
return std::format("{} {}{}", Tprefix, Tguilib_color, richTextEscape(toString(Taccessor::getValue())));
}
};
@ -81,7 +83,7 @@ struct ChangeableTextWithHighlightedValueHelper : public Taccessor, public virtu
using espchrono::toString;
using wifi_stack::toString;
return fmt::format("{} {}{}", m_prefix, Tguilib_color, richTextEscape(toString(Taccessor::getValue())));
return std::format("{} {}{}", m_prefix, Tguilib_color, richTextEscape(toString(Taccessor::getValue())));
}
const std::string &prefix() const { return m_prefix; }