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

Commit f3146c55 authored by Victor Chang's avatar Victor Chang Committed by Automerger Merge Worker
Browse files

Merge "Add constexpr specifier to read-only flag" into main am: fef2ea0b

parents 30b09e48 fef2ea0b
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -234,11 +234,11 @@ inline bool disabled_rw_in_other_namespace() {
    return provider_->disabled_rw_in_other_namespace();
}

inline bool enabled_fixed_ro() {
constexpr inline bool enabled_fixed_ro() {
    return COM_ANDROID_ACONFIG_TEST_ENABLED_FIXED_RO;
}

inline bool enabled_fixed_ro_exported() {
constexpr inline bool enabled_fixed_ro_exported() {
    return COM_ANDROID_ACONFIG_TEST_ENABLED_FIXED_RO_EXPORTED;
}

@@ -496,7 +496,7 @@ inline bool disabled_rw_in_other_namespace() {
    return false;
}

inline bool enabled_fixed_ro() {
constexpr inline bool enabled_fixed_ro() {
    return COM_ANDROID_ACONFIG_TEST_ENABLED_FIXED_RO;
}

@@ -1189,7 +1189,7 @@ public:

extern std::unique_ptr<flag_provider_interface> provider_;

inline bool disabled_fixed_ro() {
constexpr inline bool disabled_fixed_ro() {
    return COM_ANDROID_ACONFIG_TEST_DISABLED_FIXED_RO;
}

@@ -1197,7 +1197,7 @@ inline bool disabled_ro() {
    return false;
}

inline bool enabled_fixed_ro() {
constexpr inline bool enabled_fixed_ro() {
    return COM_ANDROID_ACONFIG_TEST_ENABLED_FIXED_RO;
}

+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ public:
extern std::unique_ptr<flag_provider_interface> provider_;

{{ for item in class_elements}}
{{ if not is_test_mode }}{{ if item.is_fixed_read_only }}constexpr {{ endif }}{{ endif -}}
inline bool {item.flag_name}() \{
    {{ -if is_test_mode }}
    return provider_->{item.flag_name}();