[Lldb-commits] [lldb] r120967 - in /lldb/trunk: include/lldb/API/SBBroadcaster.h source/API/SBBroadcaster.cpp
Greg Clayton
gclayton at apple.com
Sun Dec 5 15:14:19 PST 2010
Author: gclayton
Date: Sun Dec 5 17:14:19 2010
New Revision: 120967
URL: http://llvm.org/viewvc/llvm-project?rev=120967&view=rev
Log:
Added a less than operator that will compare the internal opaque pointer values so SBBroadcaster objects can be contained in ordered containers or sorted.
Modified:
lldb/trunk/include/lldb/API/SBBroadcaster.h
lldb/trunk/source/API/SBBroadcaster.cpp
Modified: lldb/trunk/include/lldb/API/SBBroadcaster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBroadcaster.h?rev=120967&r1=120966&r2=120967&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBroadcaster.h (original)
+++ lldb/trunk/include/lldb/API/SBBroadcaster.h Sun Dec 5 17:14:19 2010
@@ -58,12 +58,22 @@
RemoveListener (const lldb::SBListener &listener, uint32_t event_mask = UINT32_MAX);
#ifndef SWIG
+ // This comparison is checking if the internal opaque pointer value
+ // is equal to that in "rhs".
bool
operator == (const lldb::SBBroadcaster &rhs) const;
+ // This comparison is checking if the internal opaque pointer value
+ // is not equal to that in "rhs".
bool
operator != (const lldb::SBBroadcaster &rhs) const;
+ // This comparison is checking if the internal opaque pointer value
+ // is less than that in "rhs" so SBBroadcaster objects can be contained
+ // in ordered containers.
+ bool
+ operator < (const lldb::SBBroadcaster &rhs) const;
+
#endif
protected:
Modified: lldb/trunk/source/API/SBBroadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBroadcaster.cpp?rev=120967&r1=120966&r2=120967&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBroadcaster.cpp (original)
+++ lldb/trunk/source/API/SBBroadcaster.cpp Sun Dec 5 17:14:19 2010
@@ -189,3 +189,9 @@
{
return m_opaque_ptr != rhs.m_opaque_ptr;
}
+
+bool
+SBBroadcaster::operator < (const SBBroadcaster &rhs) const
+{
+ return m_opaque_ptr < rhs.m_opaque_ptr;
+}
More information about the lldb-commits
mailing list