MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / EnvGuard

Method EnvGuard

unit_tests/storage/shared_memory.cpp:16–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14 bool was_set;
15
16 EnvGuard(const std::string &name_) : name(name_)
17 {
18 const char *val = std::getenv(name.c_str());
19 was_set = (val != nullptr);
20 if (was_set)
21 saved_value = val;
22 }
23
24 ~EnvGuard()
25 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected