Reuse IsEmpty for ConstString::operator bool().
authorTatyana Krasnukha <tatyana@synopsys.com>
Wed, 14 Mar 2018 18:29:33 +0000 (18:29 +0000)
committerTatyana Krasnukha <tatyana@synopsys.com>
Wed, 14 Mar 2018 18:29:33 +0000 (18:29 +0000)
llvm-svn: 327548

lldb/include/lldb/Utility/ConstString.h

index fbf1a9b..c4b32a6 100644 (file)
@@ -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