[Lldb-commits] [lldb] r232892 - Compare pointers directly instead of ::strcmp in SBXxx::EventIsXxxEvent()

Ilia K ki.stfu at gmail.com
Sat Mar 21 04:11:08 PDT 2015


Author: ki.stfu
Date: Sat Mar 21 06:11:07 2015
New Revision: 232892

URL: http://llvm.org/viewvc/llvm-project?rev=232892&view=rev
Log:
Compare pointers directly instead of ::strcmp in SBXxx::EventIsXxxEvent()


Modified:
    lldb/trunk/source/API/SBCommandInterpreter.cpp
    lldb/trunk/source/API/SBProcess.cpp

Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=232892&r1=232891&r2=232892&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Sat Mar 21 06:11:07 2015
@@ -551,7 +551,7 @@ SBCommandInterpreter::GetArgumentDescrip
 bool
 SBCommandInterpreter::EventIsCommandInterpreterEvent (const lldb::SBEvent &event)
 {
-    return strcmp (event.GetBroadcasterClass(), SBCommandInterpreter::GetBroadcasterClass()) == 0;
+    return event.GetBroadcasterClass() == SBCommandInterpreter::GetBroadcasterClass();
 }
 
 bool

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=232892&r1=232891&r2=232892&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Sat Mar 21 06:11:07 2015
@@ -1001,7 +1001,7 @@ SBProcess::GetProcessFromEvent (const SB
 bool
 SBProcess::EventIsProcessEvent (const SBEvent &event)
 {
-    return strcmp (event.GetBroadcasterClass(), SBProcess::GetBroadcasterClass()) == 0;
+    return event.GetBroadcasterClass() == SBProcess::GetBroadcasterClass();
 }
 
 SBBroadcaster





More information about the lldb-commits mailing list