summaryrefslogtreecommitdiffstats
path: root/c++tools
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2021-01-04 06:38:52 -0800
committerNathan Sidwell <nathan@acm.org>2021-01-04 06:38:52 -0800
commit6288183377a0dc8f02ad415eb1ac9338507445aa (patch)
tree3cfcd8c055d24a634e0dd698c76acd4b77e5e3a2 /c++tools
parent[libcody] Windows absdir fix (diff)
downloadgcc-6288183377a0dc8f02ad415eb1ac9338507445aa.tar.gz
gcc-6288183377a0dc8f02ad415eb1ac9338507445aa.tar.bz2
gcc-6288183377a0dc8f02ad415eb1ac9338507445aa.tar.xz
[libcody] Remove some std::move [PR 98368]
Compiling on clang showed a couple of pessimizations. Fixed thusly. libcody/ * client.cc (Client::ProcessResponse): Remove std::move inside ?: c++tools/ * resolver.cc (module_resolver::cmi_response): Remove std::move of temporary.
Diffstat (limited to 'c++tools')
-rw-r--r--c++tools/resolver.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/c++tools/resolver.cc b/c++tools/resolver.cc
index c8d31153574..ef08de53072 100644
--- a/c++tools/resolver.cc
+++ b/c++tools/resolver.cc
@@ -226,9 +226,7 @@ module_resolver::cmi_response (Cody::Server *s, std::string &module)
226 auto iter = map.find (module); 226 auto iter = map.find (module);
227 if (iter == map.end ()) 227 if (iter == map.end ())
228 { 228 {
229 std::string file; 229 std::string file = default_map ? GetCMIName (module) : std::string ();
230 if (default_map)
231 file = std::move (GetCMIName (module));
232 auto res = map.emplace (module, file); 230 auto res = map.emplace (module, file);
233 iter = res.first; 231 iter = res.first;
234 } 232 }