diff --git a/common/io/kicad/kicad_io_utils.cpp b/common/io/kicad/kicad_io_utils.cpp index 40af557a91..a6648ed374 100644 --- a/common/io/kicad/kicad_io_utils.cpp +++ b/common/io/kicad/kicad_io_utils.cpp @@ -224,7 +224,7 @@ void Prettify( std::string& aSource, char aQuoteChar ) ++cursor; } - aSource = formatted; + aSource = std::move( formatted ); } } // namespace KICAD_FORMAT diff --git a/common/view/view.cpp b/common/view/view.cpp index 7bdfad34ce..b4fb7c5b28 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -683,7 +683,7 @@ void VIEW::ReorderLayerData( std::unordered_map aReorderMap ) new_map[pair.second].id = pair.second; } - m_layers = new_map; + m_layers = std::move( new_map ); for( VIEW_ITEM* item : *m_allItems ) {