From 58cf8e3ffa23752f4e8e38cab4d89f9b44f9e57a Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sat, 19 Dec 2020 15:31:52 +0900 Subject: 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 --- libs/androidfw/AssetManager2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/androidfw/AssetManager2.cpp') diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp index a545b3d5e134..bec80a7d605e 100644 --- a/libs/androidfw/AssetManager2.cpp +++ b/libs/androidfw/AssetManager2.cpp @@ -670,7 +670,7 @@ base::expected AssetManager2::FindEntryInternal( } auto entry_flags = type_spec->GetFlagsForEntryIndex(entry_idx); - if (UNLIKELY(!entry_flags)) { + if (UNLIKELY(!entry_flags.has_value())) { return base::unexpected(entry_flags.error()); } type_flags |= entry_flags.value(); -- cgit v1.2.3-59-g8ed1b