Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 088af197 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[res] Update resources to c++23"

parents d5e24316 ba6f8a3c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ package {

cc_defaults {
    name: "idmap2_defaults",
    cpp_std: "gnu++2b",
    tidy: true,
    tidy_checks: [
        "modernize-*",
@@ -31,6 +32,7 @@ cc_defaults {
        "android-*",
        "misc-*",
        "readability-*",
        "-readability-identifier-length",
    ],
    tidy_checks_as_errors: [
        "modernize-*",
@@ -52,7 +54,6 @@ cc_defaults {
        "-readability-const-return-type",
        "-readability-convert-member-functions-to-static",
        "-readability-else-after-return",
        "-readability-identifier-length",
        "-readability-named-parameter",
        "-readability-redundant-access-specifiers",
        "-readability-uppercase-literal-suffix",
@@ -113,6 +114,7 @@ cc_library {
        "libidmap2/proto/*.proto",
    ],
    host_supported: true,
    tidy: false,
    proto: {
        type: "lite",
        export_proto_headers: true,
+3 −2
Original line number Diff line number Diff line
@@ -259,7 +259,8 @@ TEST(ResultTests, CascadeError) {
}

struct NoCopyContainer {
  uint32_t value;  // NOLINT(misc-non-private-member-variables-in-classes)
  uint32_t value = 0;  // NOLINT(misc-non-private-member-variables-in-classes)
  NoCopyContainer() = default;
  NoCopyContainer(const NoCopyContainer&) = delete;
  NoCopyContainer& operator=(const NoCopyContainer&) = delete;
};
@@ -268,7 +269,7 @@ Result<std::unique_ptr<NoCopyContainer>> CreateNoCopyContainer(bool succeed) {
  if (!succeed) {
    return Error("foo");
  }
  std::unique_ptr<NoCopyContainer> p(new NoCopyContainer{0U});
  std::unique_ptr<NoCopyContainer> p(new NoCopyContainer{});
  p->value = 42U;
  return std::move(p);
}
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ license {

cc_defaults {
    name: "libandroidfw_defaults",
    cpp_std: "gnu++2b",
    cflags: [
        "-Werror",
        "-Wunreachable-code",
+2 −2
Original line number Diff line number Diff line
@@ -288,12 +288,12 @@ inline ::std::basic_string<TChar>& operator+=(::std::basic_string<TChar>& lhs,

template <typename TChar>
inline bool operator==(const ::std::basic_string<TChar>& lhs, const BasicStringPiece<TChar>& rhs) {
  return rhs == lhs;
  return BasicStringPiece<TChar>(lhs) == rhs;
}

template <typename TChar>
inline bool operator!=(const ::std::basic_string<TChar>& lhs, const BasicStringPiece<TChar>& rhs) {
  return rhs != lhs;
  return BasicStringPiece<TChar>(lhs) != rhs;
}

}  // namespace android
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ toolSources = [

cc_defaults {
    name: "aapt2_defaults",
    cpp_std: "gnu++2b",
    cflags: [
        "-Wall",
        "-Werror",