MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / get_ohd_env_variable_bool

Method get_ohd_env_variable_bool

OpenHD/ohd_common/src/openhd_util.cpp:257–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257bool OHDUtil::get_ohd_env_variable_bool(const std::string& name) {
258 if (!OHDUtil::contains_after_uppercase(name, "OHD_")) {
259 openhd::log::get_default()->warn(
260 "Please prefix OpenHD env variables with {OHD_}");
261 }
262 if (const char* env_p = std::getenv(name.c_str())) {
263 if (std::string(env_p) == "1") {
264 return true;
265 }
266 }
267 return false;
268}
269
270template <typename T>
271std::string OHDUtil::vec_as_string(const std::vector<T>& v) {

Callers

nothing calls this directly

Calls 1

contains_after_uppercaseFunction · 0.85

Tested by

no test coverage detected