g++ 11.2 compile fix
Errors have been:
/home/schwann/work/ESA/spacecreator/src/libs/conversion/sdl/SedsToSdlTranslator/translator.cpp: In member function ‘void conversion::sdl::translator::SedsToSdlTranslator::translateComponent(const seds::model::Package&, const seds::model::Component&, Asn1Acn::Asn1Model*, ivm::IVModel*, sdl::SdlModel*) const’:
/home/schwann/work/ESA/spacecreator/src/libs/conversion/sdl/SedsToSdlTranslator/translator.cpp:137:25: error: loop variable ‘timerName’ creates a copy from type ‘const QString’ [-Werror=range-loop-construct]
137 | for (const auto timerName : process.timerNames()) {
| ^~~~~~~~~
/home/schwann/work/ESA/spacecreator/src/libs/conversion/sdl/SedsToSdlTranslator/translator.cpp:137:25: note: use reference type to prevent copying
137 | for (const auto timerName : process.timerNames()) {
| ^~~~~~~~~
| &
/home/schwann/work/ESA/spacecreator/src/libs/conversion/sdl/SedsToSdlTranslator/specialized/statemachinetranslator.cpp: In static member function ‘static std::unique_ptr<sdl::ProcedureCall> conversion::sdl::translator::StateMachineTranslator::createTimerSetCall(QString, uint64_t)’:
/home/schwann/work/ESA/spacecreator/src/libs/conversion/sdl/SedsToSdlTranslator/specialized/statemachinetranslator.cpp:459:21: error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
459 | return std::move(call);
| ~~~~~~~~~^~~~~~
/home/schwann/work/ESA/spacecreator/src/libs/conversion/sdl/SedsToSdlTranslator/specialized/statemachinetranslator.cpp:459:21: note: remove ‘std::move’ call
Edited by Guenter Schwann