From 117ec4a84f43f8d1f4ab296c40e1c602bc49d557 Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Wed, 7 Sep 2022 22:00:09 +0200 Subject: [PATCH] bugfixed compile errors in CI --- lib/jkqtcommon/jkqtpdrawingtools.cpp | 8 ++++---- lib/jkqtcommon/jkqtpdrawingtools.h | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/jkqtcommon/jkqtpdrawingtools.cpp b/lib/jkqtcommon/jkqtpdrawingtools.cpp index eb92f0a3c9..7799c93e68 100644 --- a/lib/jkqtcommon/jkqtpdrawingtools.cpp +++ b/lib/jkqtcommon/jkqtpdrawingtools.cpp @@ -556,12 +556,12 @@ QVector JKQTPlotterDrawingTools::JKQTPCustomGraph JKQTPGraphSymbols JKQTPRegisterCustomGraphSymbol(JKQTPCustomGraphSymbolFunctor&& f) { - JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.emplace_back(std::move(f)); - return JKQTPFirstCustomSymbol+(JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.size()-1); + JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.push_back(std::move(f)); + return static_cast(static_cast(JKQTPFirstCustomSymbol)+static_cast(JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.size()-1)); } JKQTPGraphSymbols JKQTPRegisterCustomGraphSymbol(const JKQTPCustomGraphSymbolFunctor& f) { - JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.emplace_back(f); - return JKQTPFirstCustomSymbol+(JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.size()-1); + JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.push_back(f); + return static_cast(static_cast(JKQTPFirstCustomSymbol)+static_cast(JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.size()-1)); } diff --git a/lib/jkqtcommon/jkqtpdrawingtools.h b/lib/jkqtcommon/jkqtpdrawingtools.h index df22661a42..1af934bfab 100644 --- a/lib/jkqtcommon/jkqtpdrawingtools.h +++ b/lib/jkqtcommon/jkqtpdrawingtools.h @@ -214,6 +214,10 @@ inline JKQTPGraphSymbols operator+(JKQTPGraphSymbols a, int64_t b) { return static_cast(static_cast(a)+b); } +inline JKQTPGraphSymbols operator+(JKQTPGraphSymbols a, const QChar& b) { + return static_cast(static_cast(a)+static_cast(b.unicode())); +} + /** \brief register a JKQTPCustomGraphSymbolFunctor that draws a custom symbol.Returns an ID that allows to access the symbol! * \ingroup jkqtptools_drawing @@ -250,13 +254,13 @@ JKQTCOMMON_LIB_EXPORT JKQTPGraphSymbols String2JKQTPGraphSymbols(const QString& inline QDataStream& operator<<(QDataStream& str, JKQTPGraphSymbols s) { - str<(s); + str<(s); return str; } inline QDataStream& operator>>(QDataStream& str, JKQTPGraphSymbols& s) { - str<(s); + str<(s); return str; }