MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / getWindowsEnvironmentVariable

Method getWindowsEnvironmentVariable

src/thundersvm/util/log.cpp:959–966  ·  view source on GitHub ↗

@brief Gets environment variables for Windows based OS. We are not using getenv(const char*) because of CRT deprecation @param varname Variable name to get environment variable value for @return If variable exist the value of it otherwise nullptr

Source from the content-addressed store, hash-verified

957/// @param varname Variable name to get environment variable value for
958/// @return If variable exist the value of it otherwise nullptr
959const char* OS::getWindowsEnvironmentVariable(const char* varname) {
960 const DWORD bufferLen = 50;
961 static char buffer[bufferLen];
962 if (GetEnvironmentVariableA(varname, buffer, bufferLen)) {
963 return buffer;
964 }
965 return nullptr;
966}
967#endif // ELPP_OS_WINDOWS
968#if ELPP_OS_ANDROID
969 std::string OS::getProperty(const char* prop) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected