From a284b6f937d7ee3835474876709925f8446dcb58 Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Fri, 18 Oct 2024 14:29:17 +0200 Subject: [PATCH] minor fix for MSVC and C++20 --- lib/jkqtplotter/jkqtpcoordinateaxes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp index d5a295986a..540d233b1d 100644 --- a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp +++ b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp @@ -484,7 +484,8 @@ QString JKQTPCoordinateAxis::floattolabel(double data, int past_comma) const { #if __cplusplus >= 202002L # ifdef __cpp_lib_format case JKQTPCALTformat: { - return QString::fromStdString(std::vformat(axisStyle.tickFormatFormat.toStdString(), std::make_format_args(data, tickUnitName.toStdString()))); + const std::string tickUName=tickUnitName.toStdString(); + return QString::fromStdString(std::vformat(axisStyle.tickFormatFormat.toStdString(), std::make_format_args(data, tickUName))); }; break; /** \copydoc JKQTPCoordinateAxisStyle::tickFormatFormat */ void setTickFormatFormat(const QString& __value);