From d05675f6733e28678e2bc1ae61e4fe8a36819d22 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 4 Jan 2024 16:26:32 +0000 Subject: [PATCH] Minor performance wins. --- common/io/kicad/kicad_io_utils.cpp | 2 +- common/view/view.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ) {