summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2021-05-11 16:24:35 -0700
committerElliott Hughes <enh@google.com>2021-05-11 16:24:35 -0700
commit0523328a0081f20890d88d7ce348e66dfa179d42 (patch)
tree4d5d28588581b46fac39d72cbca5f1e91a017829
parent61f27d7d5242fdf41478d416fe7090995be9d499 (diff)
Remove a use of String16::remove.
This function, ironically, is being removed. This is one of only two users, and it's pretty hard to use correctly. In this case, using one of the existing constructors to keep a prefix seems clearer even in a world where remove() was better implemented. Test: treehugger Change-Id: Icdf02d9fcc059c396c13787d9bb4e8bda5658656
-rw-r--r--tools/aapt/pseudolocalize.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/aapt/pseudolocalize.cpp b/tools/aapt/pseudolocalize.cpp
index 5c47e0fa8a16..4e8dcb1bc6ee 100644
--- a/tools/aapt/pseudolocalize.cpp
+++ b/tools/aapt/pseudolocalize.cpp
@@ -194,7 +194,8 @@ static String16 pseudo_generate_expansion(const unsigned int length) {
break;
}
}
- result.remove(length + ext, 0);
+ // Just keep the first length + ext characters
+ result = String16(result, length + ext);
}
return result;
}