Loading base/include/android-base/expected.h +12 −28 Original line number Diff line number Diff line Loading @@ -387,14 +387,10 @@ class _NODISCARD_ expected { template<class T1, class E1, class T2, class E2> constexpr bool operator==(const expected<T1, E1>& x, const expected<T2, E2>& y) { if (x.has_value() != y.has_value()) { return false; } else if (!x.has_value()) { return x.error() == y.error(); } else { if (x.has_value() != y.has_value()) return false; if (!x.has_value()) return x.error() == y.error(); return *x == *y; } } template<class T1, class E1, class T2, class E2> constexpr bool operator!=(const expected<T1, E1>& x, const expected<T2, E2>& y) { Loading Loading @@ -581,35 +577,23 @@ class _NODISCARD_ expected<void, E> { template<class E1, class E2> constexpr bool operator==(const expected<void, E1>& x, const expected<void, E2>& y) { if (x.has_value() != y.has_value()) { return false; } else if (!x.has_value()) { return x.error() == y.error(); } else { if (x.has_value() != y.has_value()) return false; if (!x.has_value()) return x.error() == y.error(); return true; } } template<class T1, class E1, class E2> constexpr bool operator==(const expected<T1, E1>& x, const expected<void, E2>& y) { if (x.has_value() != y.has_value()) { if (x.has_value() != y.has_value()) return false; if (!x.has_value()) return x.error() == y.error(); return false; } else if (!x.has_value()) { return x.error() == y.error(); } else { return false; } } template<class E1, class T2, class E2> constexpr bool operator==(const expected<void, E1>& x, const expected<T2, E2>& y) { if (x.has_value() != y.has_value()) { if (x.has_value() != y.has_value()) return false; if (!x.has_value()) return x.error() == y.error(); return false; } else if (!x.has_value()) { return x.error() == y.error(); } else { return false; } } template<class E> Loading libstats/pull/Android.bp +10 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,15 @@ cc_test { "libstatspull", "libstatssocket", ], test_suites: ["general-tests"], test_suites: ["general-tests", "mts"], //TODO(b/153588990): Remove when the build system properly separates //32bit and 64bit architectures. compile_multilib: "both", multilib: { lib64: { suffix: "64", } }, cflags: [ "-Wall", "-Werror", Loading @@ -93,4 +101,5 @@ cc_test { "-Wno-unused-function", "-Wno-unused-parameter", ], require_root: true, } libstats/socket/Android.bp +10 −1 Original line number Diff line number Diff line Loading @@ -122,5 +122,14 @@ cc_test { "libcutils", "libutils", ], test_suites: ["device-tests"], test_suites: ["device-tests", "mts"], //TODO(b/153588990): Remove when the build system properly separates //32bit and 64bit architectures. compile_multilib: "both", multilib: { lib64: { suffix: "64", } }, require_root: true, } libstats/socket/tests/stats_event_test.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,12 @@ using std::vector; // Side-effect: this function moves the start of the buffer past the read value template <class T> T readNext(uint8_t** buffer) { T value = *(T*)(*buffer); T value; if ((reinterpret_cast<uintptr_t>(*buffer) % alignof(T)) == 0) { value = *(T*)(*buffer); } else { memcpy(&value, *buffer, sizeof(T)); } *buffer += sizeof(T); return value; } Loading rootdir/init.rc +2 −2 Original line number Diff line number Diff line Loading @@ -544,8 +544,8 @@ on post-fs-data enter_default_mount_ns # /data/apex is now available. Start apexd to scan and activate APEXes. mkdir /data/apex 0750 root system encryption=None mkdir /data/apex/active 0750 root system mkdir /data/apex 0755 root system encryption=None mkdir /data/apex/active 0755 root system mkdir /data/apex/backup 0700 root system mkdir /data/apex/hashtree 0700 root system mkdir /data/apex/sessions 0700 root system Loading Loading
base/include/android-base/expected.h +12 −28 Original line number Diff line number Diff line Loading @@ -387,14 +387,10 @@ class _NODISCARD_ expected { template<class T1, class E1, class T2, class E2> constexpr bool operator==(const expected<T1, E1>& x, const expected<T2, E2>& y) { if (x.has_value() != y.has_value()) { return false; } else if (!x.has_value()) { return x.error() == y.error(); } else { if (x.has_value() != y.has_value()) return false; if (!x.has_value()) return x.error() == y.error(); return *x == *y; } } template<class T1, class E1, class T2, class E2> constexpr bool operator!=(const expected<T1, E1>& x, const expected<T2, E2>& y) { Loading Loading @@ -581,35 +577,23 @@ class _NODISCARD_ expected<void, E> { template<class E1, class E2> constexpr bool operator==(const expected<void, E1>& x, const expected<void, E2>& y) { if (x.has_value() != y.has_value()) { return false; } else if (!x.has_value()) { return x.error() == y.error(); } else { if (x.has_value() != y.has_value()) return false; if (!x.has_value()) return x.error() == y.error(); return true; } } template<class T1, class E1, class E2> constexpr bool operator==(const expected<T1, E1>& x, const expected<void, E2>& y) { if (x.has_value() != y.has_value()) { if (x.has_value() != y.has_value()) return false; if (!x.has_value()) return x.error() == y.error(); return false; } else if (!x.has_value()) { return x.error() == y.error(); } else { return false; } } template<class E1, class T2, class E2> constexpr bool operator==(const expected<void, E1>& x, const expected<T2, E2>& y) { if (x.has_value() != y.has_value()) { if (x.has_value() != y.has_value()) return false; if (!x.has_value()) return x.error() == y.error(); return false; } else if (!x.has_value()) { return x.error() == y.error(); } else { return false; } } template<class E> Loading
libstats/pull/Android.bp +10 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,15 @@ cc_test { "libstatspull", "libstatssocket", ], test_suites: ["general-tests"], test_suites: ["general-tests", "mts"], //TODO(b/153588990): Remove when the build system properly separates //32bit and 64bit architectures. compile_multilib: "both", multilib: { lib64: { suffix: "64", } }, cflags: [ "-Wall", "-Werror", Loading @@ -93,4 +101,5 @@ cc_test { "-Wno-unused-function", "-Wno-unused-parameter", ], require_root: true, }
libstats/socket/Android.bp +10 −1 Original line number Diff line number Diff line Loading @@ -122,5 +122,14 @@ cc_test { "libcutils", "libutils", ], test_suites: ["device-tests"], test_suites: ["device-tests", "mts"], //TODO(b/153588990): Remove when the build system properly separates //32bit and 64bit architectures. compile_multilib: "both", multilib: { lib64: { suffix: "64", } }, require_root: true, }
libstats/socket/tests/stats_event_test.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,12 @@ using std::vector; // Side-effect: this function moves the start of the buffer past the read value template <class T> T readNext(uint8_t** buffer) { T value = *(T*)(*buffer); T value; if ((reinterpret_cast<uintptr_t>(*buffer) % alignof(T)) == 0) { value = *(T*)(*buffer); } else { memcpy(&value, *buffer, sizeof(T)); } *buffer += sizeof(T); return value; } Loading
rootdir/init.rc +2 −2 Original line number Diff line number Diff line Loading @@ -544,8 +544,8 @@ on post-fs-data enter_default_mount_ns # /data/apex is now available. Start apexd to scan and activate APEXes. mkdir /data/apex 0750 root system encryption=None mkdir /data/apex/active 0750 root system mkdir /data/apex 0755 root system encryption=None mkdir /data/apex/active 0755 root system mkdir /data/apex/backup 0700 root system mkdir /data/apex/hashtree 0700 root system mkdir /data/apex/sessions 0700 root system Loading