diff --git a/client/widgets/CArtifactsOfHeroBase.cpp b/client/widgets/CArtifactsOfHeroBase.cpp index f1e406571..fddddf73c 100644 --- a/client/widgets/CArtifactsOfHeroBase.cpp +++ b/client/widgets/CArtifactsOfHeroBase.cpp @@ -55,8 +55,8 @@ void CArtifactsOfHeroBase::setPutBackPickedArtifactCallback(PutBackPickedArtCall } void CArtifactsOfHeroBase::init( - const CArtPlace::ClickFunctor & lClickCallback, - const CArtPlace::ClickFunctor & showPopupCallback, + const CArtPlace::ClickFunctor & onClickPressedCallback, + const CArtPlace::ClickFunctor & onShowPopupCallback, const Point & position, const BpackScrollFunctor & scrollCallback) { @@ -77,14 +77,14 @@ void CArtifactsOfHeroBase::init( { artPlace.second->slot = artPlace.first; artPlace.second->setArtifact(nullptr); - artPlace.second->setClickPressedCallback(lClickCallback); - artPlace.second->setShowPopupCallback(showPopupCallback); + artPlace.second->setClickPressedCallback(onClickPressedCallback); + artPlace.second->setShowPopupCallback(onShowPopupCallback); } for(auto artPlace : backpack) { artPlace->setArtifact(nullptr); - artPlace->setClickPressedCallback(lClickCallback); - artPlace->setShowPopupCallback(showPopupCallback); + artPlace->setClickPressedCallback(onClickPressedCallback); + artPlace->setShowPopupCallback(onShowPopupCallback); } leftBackpackRoll = std::make_shared(Point(379, 364), AnimationPath::builtin("hsbtns3.def"), CButton::tooltip(), [scrollCallback](){scrollCallback(true);}, EShortcut::MOVE_LEFT); @@ -183,7 +183,7 @@ void CArtifactsOfHeroBase::updateWornSlots() void CArtifactsOfHeroBase::updateBackpackSlots() { ArtifactPosition slot = ArtifactPosition::BACKPACK_START; - for(auto & artPlace : backpack) + for(const auto & artPlace : backpack) { setSlotData(artPlace, slot); slot = slot + 1; diff --git a/lib/networkPacks/PacksForClient.h b/lib/networkPacks/PacksForClient.h index 934dbbd26..25a98b460 100644 --- a/lib/networkPacks/PacksForClient.h +++ b/lib/networkPacks/PacksForClient.h @@ -1030,7 +1030,7 @@ struct DLL_LINKAGE EraseArtifact : CArtifactOperationPack struct DLL_LINKAGE MoveArtifact : CArtifactOperationPack { MoveArtifact() = default; - MoveArtifact(const PlayerColor & interfaceOwner, const ArtifactLocation & src, ArtifactLocation & dst, bool askAssemble = true) + MoveArtifact(const PlayerColor & interfaceOwner, const ArtifactLocation & src, const ArtifactLocation & dst, bool askAssemble = true) : interfaceOwner(interfaceOwner), src(src), dst(dst), askAssemble(askAssemble) { } @@ -1089,8 +1089,8 @@ struct DLL_LINKAGE BulkMoveArtifacts : CArtifactOperationPack } BulkMoveArtifacts(const PlayerColor & interfaceOwner, const ObjectInstanceID srcArtHolder, const ObjectInstanceID dstArtHolder, bool swap) : interfaceOwner(interfaceOwner) - , srcArtHolder(std::move(srcArtHolder)) - , dstArtHolder(std::move(dstArtHolder)) + , srcArtHolder(srcArtHolder) + , dstArtHolder(dstArtHolder) , swap(swap) , askAssemble(false) , srcCreature(std::nullopt)