[NSDictionary] Simplify the formatter. NFCI.
authorDavide Italiano <davide@freebsd.org>
Wed, 2 May 2018 23:36:07 +0000 (23:36 +0000)
committerDavide Italiano <davide@freebsd.org>
Wed, 2 May 2018 23:36:07 +0000 (23:36 +0000)
llvm-svn: 331415

lldb/source/Plugins/Language/ObjC/NSDictionary.cpp

index 67b0ce8..b4d2578 100644 (file)
@@ -667,11 +667,7 @@ lldb_private::formatters::NSDictionary1SyntheticFrontEnd::
 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::