summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2021-12-17 01:32:47 +0900
committer Jiyong Park <jiyong@google.com> 2021-12-20 13:43:26 +0900
commitdcb1e3b9136180bb415f967c120de48ee0b8c94e (patch)
tree50d86e1b507585c26d5757def369dce717e8210c /libs/androidfw/StringPool.cpp
parentdb0515696f63bf4a4652c7c0f69e69dea932e481 (diff)
Explicit cast from android::Base::Errno to status_t
Previously, Result<T>.error().code() returned int and this was convertible to status_t which is an alias of int. However, this actually was type unsafe because the return type of error().code() was actually mean to be that of errno. errno and status_t are both int, but their meanings are very different. To handle such problems, Result<T>.error().code() now returns android::base::Errno which is a wrapper to errno, but not to other int-based types like status_t and StatusCode. Eventually, Result<T> used here should be changed into Result<T, StatusT> where StatusT is a type-safe wrapper class to status_t that implements the contract to be used as the error type in android::base::Result. Unfortunately, since the use of Result<T> is so wide spread, in this change, I aim to only fix the build error in this CL. Bug: 209929099 Test: m Change-Id: Ic10ab8ed52f6827ba3ac6fb7d6e031585827562f
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions