#ifndef UTILS_PROPERTIES_H_ #define UTILS_PROPERTIES_H_ #ifdef ANDROID #include #else #include #include #include // NOLINTNEXTLINE(readability-identifier-naming) constexpr int PROPERTY_VALUE_MAX = 92; // NOLINTNEXTLINE(readability-identifier-naming) auto inline property_get(const char *name, char *value, const char *default_value) -> int { // NOLINTNEXTLINE (concurrency-mt-unsafe) char *prop = std::getenv(name); snprintf(value, PROPERTY_VALUE_MAX, "%s", (prop == nullptr) ? default_value : prop); return static_cast(strlen(value)); } #endif #endif