TD: Switch to non-buffer-based format string interpretation
This commit is contained in:
committed by
Kacper Donat
parent
803a050082
commit
963527fc80
@@ -27,6 +27,8 @@
|
||||
# include <QString>
|
||||
#endif
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/UnitsApi.h>
|
||||
|
||||
@@ -275,7 +277,7 @@ QString DimensionFormatter::formatValueToSpec(const double value, QString format
|
||||
QString formattedValue;
|
||||
|
||||
constexpr auto format = [](QString f, double value){
|
||||
return QString::asprintf(f.toStdString().c_str(), value);
|
||||
return QString::fromStdString(fmt::sprintf(f.toStdString(), value));
|
||||
};
|
||||
|
||||
QRegularExpression wrRegExp(QStringLiteral("%(?<dec>.*)(?<spec>[wWrR])"));
|
||||
|
||||
Reference in New Issue
Block a user