bugfixed compile errors in CI

This commit is contained in:
jkriege2 2022-09-07 22:00:09 +02:00
parent ffe9e904bc
commit 117ec4a84f
2 changed files with 10 additions and 6 deletions

View File

@ -556,12 +556,12 @@ QVector<JKQTPCustomGraphSymbolFunctor> JKQTPlotterDrawingTools::JKQTPCustomGraph
JKQTPGraphSymbols JKQTPRegisterCustomGraphSymbol(JKQTPCustomGraphSymbolFunctor&& f) JKQTPGraphSymbols JKQTPRegisterCustomGraphSymbol(JKQTPCustomGraphSymbolFunctor&& f)
{ {
JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.emplace_back(std::move(f)); JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.push_back(std::move(f));
return JKQTPFirstCustomSymbol+(JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.size()-1); return static_cast<JKQTPGraphSymbols>(static_cast<uint64_t>(JKQTPFirstCustomSymbol)+static_cast<uint64_t>(JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.size()-1));
} }
JKQTPGraphSymbols JKQTPRegisterCustomGraphSymbol(const JKQTPCustomGraphSymbolFunctor& f) JKQTPGraphSymbols JKQTPRegisterCustomGraphSymbol(const JKQTPCustomGraphSymbolFunctor& f)
{ {
JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.emplace_back(f); JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.push_back(f);
return JKQTPFirstCustomSymbol+(JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.size()-1); return static_cast<JKQTPGraphSymbols>(static_cast<uint64_t>(JKQTPFirstCustomSymbol)+static_cast<uint64_t>(JKQTPlotterDrawingTools::JKQTPCustomGraphSymbolStore.size()-1));
} }

View File

@ -214,6 +214,10 @@ inline JKQTPGraphSymbols operator+(JKQTPGraphSymbols a, int64_t b) {
return static_cast<JKQTPGraphSymbols>(static_cast<uint64_t>(a)+b); return static_cast<JKQTPGraphSymbols>(static_cast<uint64_t>(a)+b);
} }
inline JKQTPGraphSymbols operator+(JKQTPGraphSymbols a, const QChar& b) {
return static_cast<JKQTPGraphSymbols>(static_cast<uint64_t>(a)+static_cast<uint64_t>(b.unicode()));
}
/** \brief register a JKQTPCustomGraphSymbolFunctor that draws a custom symbol.Returns an ID that allows to access the symbol! /** \brief register a JKQTPCustomGraphSymbolFunctor that draws a custom symbol.Returns an ID that allows to access the symbol!
* \ingroup jkqtptools_drawing * \ingroup jkqtptools_drawing
@ -250,13 +254,13 @@ JKQTCOMMON_LIB_EXPORT JKQTPGraphSymbols String2JKQTPGraphSymbols(const QString&
inline QDataStream& operator<<(QDataStream& str, JKQTPGraphSymbols s) { inline QDataStream& operator<<(QDataStream& str, JKQTPGraphSymbols s) {
str<<static_cast<uint64_t>(s); str<<static_cast<quint64>(s);
return str; return str;
} }
inline QDataStream& operator>>(QDataStream& str, JKQTPGraphSymbols& s) { inline QDataStream& operator>>(QDataStream& str, JKQTPGraphSymbols& s) {
str<<reinterpret_cast<uint64_t&>(s); str<<reinterpret_cast<quint64&>(s);
return str; return str;
} }