summaryrefslogtreecommitdiff
path: root/runtime/mirror/class.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2025-02-07 10:35:35 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2025-02-10 01:07:50 -0800
commit6ebd0862f7f91b8ff7c6ba4d3082474940893434 (patch)
tree167db63dc63c66f638f7a535239f7dba57e7a042 /runtime/mirror/class.cc
parent6fbb37a7513bf93f63f7a84925cc4d9913590abd (diff)
Use `std::string_view` for `DescriptorToDot()`, ...
... `DotToDescriptor()` and `DescriptorToName()` parameter. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 338123769 Change-Id: I9cda6e70f52ed8779fcd532a4e34515c12c40c78
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r--runtime/mirror/class.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index a6d760a188..7bc0826424 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -1454,7 +1454,7 @@ const char* Class::GetDescriptor(std::string* storage) {
// the contents of the String are also constant. See ReadBarrierOption.
ObjPtr<mirror::String> name = klass->GetName<kVerifyNone, kWithoutReadBarrier>();
DCHECK(name != nullptr);
- *storage = DotToDescriptor(name->ToModifiedUtf8().c_str());
+ *storage = DotToDescriptor(name->ToModifiedUtf8());
} else {
const char* descriptor;
if (klass->IsPrimitive()) {
@@ -1829,7 +1829,7 @@ bool Class::ProxyDescriptorEquals(ObjPtr<mirror::Class> match) {
}
// Note: Proxy descriptor should never match a non-proxy descriptor but ART does not enforce that.
- std::string descriptor = DotToDescriptor(name->ToModifiedUtf8().c_str());
+ std::string descriptor = DotToDescriptor(name->ToModifiedUtf8());
std::string_view match_descriptor =
match->GetDexFile().GetTypeDescriptorView(match->GetDexTypeIndex());
return descriptor == match_descriptor;