From 73eb5af2cc972649101d370784d115ef8e39e835 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 15 May 2018 14:33:47 -0700 Subject: [PATCH] refactor: remove unnecessary std::moves in linux code (#12951) The compiler was complaining that the move was preventing copy elision. --- atom/browser/lib/power_observer_linux.cc | 2 +- atom/browser/ui/views/submenu_button.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/lib/power_observer_linux.cc b/atom/browser/lib/power_observer_linux.cc index a13b94e3964d..979728219846 100644 --- a/atom/browser/lib/power_observer_linux.cc +++ b/atom/browser/lib/power_observer_linux.cc @@ -23,7 +23,7 @@ std::string get_executable_basename() { if (!uv_exepath(buf, &buf_size)) { rv = strrchr(static_cast(buf), '/') + 1; } - return std::move(rv); + return rv; } } // namespace diff --git a/atom/browser/ui/views/submenu_button.cc b/atom/browser/ui/views/submenu_button.cc index 07c4032a600a..28aa95bcd17a 100644 --- a/atom/browser/ui/views/submenu_button.cc +++ b/atom/browser/ui/views/submenu_button.cc @@ -32,7 +32,7 @@ SubmenuButton::SubmenuButton(const base::string16& title, background_color_(background_color) { #if defined(OS_LINUX) // Dont' use native style border. - SetBorder(std::move(CreateDefaultBorder())); + SetBorder(CreateDefaultBorder()); #endif if (GetUnderlinePosition(title, &accelerator_, &underline_start_,