summaryrefslogtreecommitdiff
path: root/runtime/mirror/class.cc
diff options
context:
space:
mode:
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;