Quellcode durchsuchen

Change `.size() == 0` to `.empty()` (#6917)

This resolves a readability-container-size-empty clang-tidy finding.
Geoff Romer vor 1 Monat
Ursprung
Commit
1d71e7a707
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      toolchain/check/cpp/constant.cpp

+ 1 - 1
toolchain/check/cpp/constant.cpp

@@ -37,7 +37,7 @@ static auto MapLValueToConstant(Context& context, SemIR::LocId loc_id,
       const_cast<clang::ValueDecl*>(value_decl));
 
   auto inst_id = ImportCppDecl(context, loc_id, key);
-  if (ap_value.getLValuePath().size() == 0) {
+  if (ap_value.getLValuePath().empty()) {
     return context.constant_values().Get(inst_id);
   }