The libc++ upgrade means we can use contains() in the linker now.
Change-Id: I30f764ddfd101dde1b7bbcefbf78182a19b3db7c
diff --git a/linker/linker_config.cpp b/linker/linker_config.cpp
index ad40c50..70430b8 100644
--- a/linker/linker_config.cpp
+++ b/linker/linker_config.cpp
@@ -304,7 +304,7 @@
}
if (result == ConfigParser::kPropertyAssign) {
- if (properties->find(name) != properties->end()) {
+ if (properties->contains(name)) {
DL_WARN("%s:%zd: warning: redefining property \"%s\" (overriding previous value)",
ld_config_file_path,
cp.lineno(),
@@ -313,7 +313,7 @@
(*properties)[name] = PropertyValue(std::move(value), cp.lineno());
} else if (result == ConfigParser::kPropertyAppend) {
- if (properties->find(name) == properties->end()) {
+ if (!properties->contains(name)) {
DL_WARN("%s:%zd: warning: appending to undefined property \"%s\" (treating as assignment)",
ld_config_file_path,
cp.lineno(),
@@ -526,7 +526,7 @@
properties.get_strings(property_name_prefix + ".links", &lineno);
for (const auto& linked_ns_name : linked_namespaces) {
- if (namespace_configs.find(linked_ns_name) == namespace_configs.end()) {
+ if (!namespace_configs.contains(linked_ns_name)) {
*error_msg = create_error_msg(ld_config_file_path,
lineno,
std::string("undefined namespace: ") + linked_ns_name);