[Lldb-commits] [lldb] r327548 - Reuse IsEmpty for ConstString::operator bool().

Tatyana Krasnukha via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 14 11:29:33 PDT 2018


Author: tkrasnukha
Date: Wed Mar 14 11:29:33 2018
New Revision: 327548

URL: http://llvm.org/viewvc/llvm-project?rev=327548&view=rev
Log:
Reuse IsEmpty for ConstString::operator bool().

Modified:
    lldb/trunk/include/lldb/Utility/ConstString.h

Modified: lldb/trunk/include/lldb/Utility/ConstString.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ConstString.h?rev=327548&r1=327547&r2=327548&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ConstString.h (original)
+++ lldb/trunk/include/lldb/Utility/ConstString.h Wed Mar 14 11:29:33 2018
@@ -140,7 +140,7 @@ public:
   ///     /b True this object contains a valid non-empty C string, \b
   ///     false otherwise.
   //------------------------------------------------------------------
-  explicit operator bool() const { return m_string && m_string[0]; }
+  explicit operator bool() const { return !IsEmpty(); }
 
   //------------------------------------------------------------------
   /// Assignment operator




More information about the lldb-commits mailing list