App: std::move() optional wrapped values out of there
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Tue, 12 Sep 2017 09:29:35 +0000 (11:29 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Tue, 12 Sep 2017 09:29:35 +0000 (11:29 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
src/app.cpp

index 47fb85c..596391c 100644 (file)
@@ -451,7 +451,7 @@ char const *App::activate_surface(char const *drawing_name) {
       if (state.sub == -1) {
          if (can_split) {
             if (state.main != *surface_id) {
-               std::string main = *this->lookup_name(state.main);
+               std::string main = std::move(*this->lookup_name(state.main));
                this->emit_syncdraw(drawing_name);
                this->emit_syncdraw(main.c_str());
 
@@ -518,7 +518,7 @@ char const *App::deactivate_surface(char const *drawing_name) {
 
    if (state.main == *surface_id) {
       if (state.sub != -1) {
-         std::string sub = *this->lookup_name(state.sub);
+         std::string sub = std::move(*this->lookup_name(state.sub));
          this->emit_syncdraw(sub.c_str());
 
          this->deactivate(*surface_id);
@@ -533,7 +533,7 @@ char const *App::deactivate_surface(char const *drawing_name) {
          state.main = -1;
       }
    }else if (state.sub == *surface_id) {
-      std::string main = *this->lookup_name(state.main);
+      std::string main = std::move(*this->lookup_name(state.main));
       this->emit_syncdraw(main.c_str());
 
       this->deactivate(*surface_id);