@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
| 957 | /// @param varname Variable name to get environment variable value for |
| 958 | /// @return If variable exist the value of it otherwise nullptr |
| 959 | const 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) { |
nothing calls this directly
no outgoing calls
no test coverage detected