Replace fmt::format with std::format
This commit is contained in:
@ -107,7 +107,6 @@ set(dependencies
|
|||||||
espchrono
|
espchrono
|
||||||
espcpputils
|
espcpputils
|
||||||
espwifistack
|
espwifistack
|
||||||
fmt
|
|
||||||
TFT_eSPI
|
TFT_eSPI
|
||||||
esptftlib
|
esptftlib
|
||||||
espfontlib
|
espfontlib
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#include "changevaluedisplay.h"
|
#include "changevaluedisplay.h"
|
||||||
|
|
||||||
|
// system includes
|
||||||
|
#include <format>
|
||||||
|
|
||||||
// 3rdparty lib includes
|
// 3rdparty lib includes
|
||||||
#include <fmt/core.h>
|
|
||||||
#include <fontrenderer.h>
|
#include <fontrenderer.h>
|
||||||
|
|
||||||
// local includes
|
// local includes
|
||||||
@ -38,6 +40,6 @@ void ChangeValueDisplay<float>::redraw(TftInterface &tft)
|
|||||||
{
|
{
|
||||||
Base::redraw(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
|
} // namespace espgui
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#include <esp_log.h>
|
#include <esp_log.h>
|
||||||
|
|
||||||
// 3rdparty lib includes
|
// 3rdparty lib includes
|
||||||
#include <fmt/core.h>
|
|
||||||
#include <strutils.h>
|
#include <strutils.h>
|
||||||
#include <fontrenderer.h>
|
#include <fontrenderer.h>
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// system includes
|
||||||
|
#include <format>
|
||||||
|
|
||||||
// 3rdparty lib includes
|
// 3rdparty lib includes
|
||||||
#include <fmt/core.h>
|
|
||||||
#include <strutils.h>
|
#include <strutils.h>
|
||||||
#include <espstrutils.h>
|
#include <espstrutils.h>
|
||||||
#include <espwifiutils.h>
|
#include <espwifiutils.h>
|
||||||
@ -26,7 +28,7 @@ struct TextWithValueHelper : public Taccessor, public virtual TextInterface
|
|||||||
using espchrono::toString;
|
using espchrono::toString;
|
||||||
using wifi_stack::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 espchrono::toString;
|
||||||
using wifi_stack::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; }
|
const std::string &prefix() const { return m_prefix; }
|
||||||
@ -65,7 +67,7 @@ struct TextWithHighlightedValueHelper : public Taccessor, public virtual TextInt
|
|||||||
using espchrono::toString;
|
using espchrono::toString;
|
||||||
using wifi_stack::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 espchrono::toString;
|
||||||
using wifi_stack::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; }
|
const std::string &prefix() const { return m_prefix; }
|
||||||
|
Reference in New Issue
Block a user