Merge "[res] Update resources to c++23"
This commit is contained in:
committed by
Android (Google) Code Review
commit
088af197e2
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ license {
|
||||
|
||||
cc_defaults {
|
||||
name: "libandroidfw_defaults",
|
||||
cpp_std: "gnu++2b",
|
||||
cflags: [
|
||||
"-Werror",
|
||||
"-Wunreachable-code",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,6 +36,7 @@ toolSources = [
|
||||
|
||||
cc_defaults {
|
||||
name: "aapt2_defaults",
|
||||
cpp_std: "gnu++2b",
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
|
||||
Reference in New Issue
Block a user