Author: davide
Date: Wed May  2 16:36:07 2018
New Revision: 331415

URL: http://llvm.org/viewvc/llvm-project?rev=331415&view=rev
Log:
[NSDictionary] Simplify the formatter. NFCI.

Modified:
    lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp

Modified: lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp?rev=331415&r1=331414&r2=331415&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp Wed May  2 
16:36:07 2018
@@ -667,11 +667,7 @@ lldb_private::formatters::NSDictionary1S
 size_t lldb_private::formatters::NSDictionary1SyntheticFrontEnd::
     GetIndexOfChildWithName(const ConstString &name) {
   static const ConstString g_zero("[0]");
-
-  if (name == g_zero)
-    return 0;
-
-  return UINT32_MAX;
+  return name == g_zero ? 0 : UINT32_MAX;
 }
 
 size_t lldb_private::formatters::NSDictionary1SyntheticFrontEnd::


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

Reply via email to