From ade063198edba319a9c499edfaa490b4694e4aa6 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Thu, 10 Aug 2023 23:54:44 +0000 Subject: Use String8/16 c_str [tools] Bug: 295394788 Test: make checkbuild Change-Id: I82d6899d8c15a10b15399c39177290012bb5f13b --- tools/aapt/pseudolocalize.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/aapt/pseudolocalize.cpp') diff --git a/tools/aapt/pseudolocalize.cpp b/tools/aapt/pseudolocalize.cpp index 4e8dcb1bc6ee..fc2ed98949dd 100644 --- a/tools/aapt/pseudolocalize.cpp +++ b/tools/aapt/pseudolocalize.cpp @@ -42,7 +42,7 @@ String16 Pseudolocalizer::text(const String16& text) { size_t depth = mLastDepth; size_t lastpos, pos; const size_t length= text.size(); - const char16_t* str = text.string(); + const char16_t* str = text.c_str(); bool escaped = false; for (lastpos = pos = 0; pos < length; pos++) { char16_t c = str[pos]; @@ -181,7 +181,7 @@ static bool is_possible_normal_placeholder_end(const char16_t c) { static String16 pseudo_generate_expansion(const unsigned int length) { String16 result = k_expansion_string; - const char16_t* s = result.string(); + const char16_t* s = result.c_str(); if (result.size() < length) { result += String16(" "); result += pseudo_generate_expansion(length - result.size()); @@ -237,7 +237,7 @@ String16 PseudoMethodAccent::end() { */ String16 PseudoMethodAccent::text(const String16& source) { - const char16_t* s = source.string(); + const char16_t* s = source.c_str(); String16 result; const size_t I = source.size(); bool lastspace = true; @@ -357,7 +357,7 @@ String16 PseudoMethodAccent::placeholder(const String16& source) { String16 PseudoMethodBidi::text(const String16& source) { - const char16_t* s = source.string(); + const char16_t* s = source.c_str(); String16 result; bool lastspace = true; bool space = true; -- cgit v1.2.3-59-g8ed1b