From: Android Tools Maintainers Date: Fri, 21 Jan 2022 15:26:23 +0000 (+0000) Subject: method-reference-std-ns X-Git-Tag: archive/raspbian/11.0.0+r48-4+rpi1~1^2^2^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=142f3c9299911f444af8d767f78f5c564a33b7a2;p=android-platform-art.git method-reference-std-ns Gbp-Pq: Name method-reference-std-ns.patch --- diff --git a/libdexfile/dex/method_reference.h b/libdexfile/dex/method_reference.h index ba69984..6a2ea9c 100644 --- a/libdexfile/dex/method_reference.h +++ b/libdexfile/dex/method_reference.h @@ -53,20 +53,20 @@ struct MethodReferenceValueComparator { // Compare the class descriptors first. const dex::MethodId& mid1 = mr1.GetMethodId(); const dex::MethodId& mid2 = mr2.GetMethodId(); - int descriptor_diff = strcmp(mr1.dex_file->StringByTypeIdx(mid1.class_idx_), + int descriptor_diff = std::strcmp(mr1.dex_file->StringByTypeIdx(mid1.class_idx_), mr2.dex_file->StringByTypeIdx(mid2.class_idx_)); if (descriptor_diff != 0) { return descriptor_diff < 0; } // Compare names second. - int name_diff = strcmp(mr1.dex_file->GetMethodName(mid1), mr2.dex_file->GetMethodName(mid2)); + int name_diff = std::strcmp(mr1.dex_file->GetMethodName(mid1), mr2.dex_file->GetMethodName(mid2)); if (name_diff != 0) { return name_diff < 0; } // And then compare proto ids, starting with return type comparison. const dex::ProtoId& prid1 = mr1.dex_file->GetProtoId(mid1.proto_idx_); const dex::ProtoId& prid2 = mr2.dex_file->GetProtoId(mid2.proto_idx_); - int return_type_diff = strcmp(mr1.dex_file->StringByTypeIdx(prid1.return_type_idx_), + int return_type_diff = std::strcmp(mr1.dex_file->StringByTypeIdx(prid1.return_type_idx_), mr2.dex_file->StringByTypeIdx(prid2.return_type_idx_)); if (return_type_diff != 0) { return return_type_diff < 0; @@ -77,7 +77,7 @@ struct MethodReferenceValueComparator { const dex::TypeList* params2 = mr2.dex_file->GetProtoParameters(prid2); size_t param2_size = (params2 != nullptr) ? params2->Size() : 0u; for (size_t i = 0, num = std::min(param1_size, param2_size); i != num; ++i) { - int param_diff = strcmp(mr1.dex_file->StringByTypeIdx(params1->GetTypeItem(i).type_idx_), + int param_diff = std::strcmp(mr1.dex_file->StringByTypeIdx(params1->GetTypeItem(i).type_idx_), mr2.dex_file->StringByTypeIdx(params2->GetTypeItem(i).type_idx_)); if (param_diff != 0) { return param_diff < 0;