Author: Jonas Devlieghere
Date: 2020-03-02T15:54:00-08:00
New Revision: 7ad30f4249cf70983d9f7e921445f7af9e158d38

URL: 
https://github.com/llvm/llvm-project/commit/7ad30f4249cf70983d9f7e921445f7af9e158d38
DIFF: 
https://github.com/llvm/llvm-project/commit/7ad30f4249cf70983d9f7e921445f7af9e158d38.diff

LOG: [lldb/Utility] Use emplace_back instead of push_back (NFC)

Use emplace_back to allow for in-place construction of the
BroadcastEventSpec instead of copying it.

Added: 
    

Modified: 
    lldb/source/Utility/Broadcaster.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Utility/Broadcaster.cpp 
b/lldb/source/Utility/Broadcaster.cpp
index 90f91b4f89cf..342548c0b0e6 100644
--- a/lldb/source/Utility/Broadcaster.cpp
+++ b/lldb/source/Utility/Broadcaster.cpp
@@ -373,8 +373,8 @@ bool BroadcasterManager::UnregisterListenerForEvents(
 
     if (event_bits_to_remove != iter_event_bits) {
       uint32_t new_event_bits = iter_event_bits & ~event_bits_to_remove;
-      to_be_readded.push_back(
-          BroadcastEventSpec(event_spec.GetBroadcasterClass(), 
new_event_bits));
+      to_be_readded.emplace_back(event_spec.GetBroadcasterClass(),
+                                 new_event_bits);
     }
     m_event_map.erase(iter);
   }


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to