Add explicit Result::ok() checks where needed
Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests Exempt-From-Owner-Approval: mechanical mass refactoring Change-Id: I3117833c51cdb333cccdfd159d1582f2adef77db
This commit is contained in:
@@ -531,14 +531,14 @@ bool ExtractResFilePathParts(const StringPiece& path, StringPiece* out_prefix,
|
||||
}
|
||||
|
||||
StringPiece16 GetString16(const android::ResStringPool& pool, size_t idx) {
|
||||
if (auto str = pool.stringAt(idx)) {
|
||||
if (auto str = pool.stringAt(idx); str.ok()) {
|
||||
return *str;
|
||||
}
|
||||
return StringPiece16();
|
||||
}
|
||||
|
||||
std::string GetString(const android::ResStringPool& pool, size_t idx) {
|
||||
if (auto str = pool.string8At(idx)) {
|
||||
if (auto str = pool.string8At(idx); str.ok()) {
|
||||
return ModifiedUtf8ToUtf8(str->to_string());
|
||||
}
|
||||
return Utf16ToUtf8(GetString16(pool, idx));
|
||||
|
||||
Reference in New Issue
Block a user