diff --git a/examples/libexampletools/jkqtpexampleapplication.h b/examples/libexampletools/jkqtpexampleapplication.h index 17da0f6d6d0..b7502af8db5 100644 --- a/examples/libexampletools/jkqtpexampleapplication.h +++ b/examples/libexampletools/jkqtpexampleapplication.h @@ -44,7 +44,7 @@ public Q_SLOTS: inline Data(const std::function& f_): type(FunctorType), f(f_), plotf(), p(nullptr) {} - inline Data(JKQTPlotter* p_): + inline Data(JKQTPlotter* p_=nullptr): type(PlotterType), f(), plotf(), p(p_) {} inline Data(std::function p_): diff --git a/lib/jkqtcommon/jkqtpmathtools.h b/lib/jkqtcommon/jkqtpmathtools.h index 682fbaa7163..a1b17e6c261 100644 --- a/lib/jkqtcommon/jkqtpmathtools.h +++ b/lib/jkqtcommon/jkqtpmathtools.h @@ -664,7 +664,10 @@ JKQTCOMMON_LIB_EXPORT void jkqtp_estimateFraction(double input, int &sign, uint6 */ template inline T jkqtp_reversed(const T& l) { - return T(l.rbegin(), l.rend()); + T reversed_l; + reversed_l.reserve(l.size()); + std::reverse_copy(l.begin(), l.end(), std::back_inserter(reversed_l)); + return reversed_l; } /*! \brief can be used to build a hash-values from several hash-values diff --git a/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp b/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp index c9bc2b6f451..24c9a3c4d38 100644 --- a/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp +++ b/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp @@ -534,7 +534,7 @@ void doListStyles(const QDir& outputDir, const QStringList& doctomodify, int ico shtml<<"\n \n
Style-file\n Screenshot\n Symbols\n"; auto files=dir.entryList(); if (files.indexOf("default.ini")>=0) { - files.swapItemsAt(0,files.indexOf("default.ini")); + qSwap(files[0], files[files.indexOf("default.ini")]); } for (auto& f: files) { qDebug()<<"plotting example for style "<