| 255 | } |
| 256 | |
| 257 | bool 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 | |
| 270 | template <typename T> |
| 271 | std::string OHDUtil::vec_as_string(const std::vector<T>& v) { |
nothing calls this directly
no test coverage detected