Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
1 addition
and
14 deletions.
-
+1
−14
external/mdal/mdal_utils.cpp
|
@@ -21,20 +21,7 @@ std::string MDAL::getEnvVar( const std::string &varname, const std::string &defa |
|
|
if ( varname.empty() ) |
|
|
return std::string(); |
|
|
|
|
|
char *envVarC = nullptr; |
|
|
#ifdef WIN32 |
|
|
size_t requiredSize = 0; |
|
|
getenv_s( &requiredSize, NULL, 0, varname.c_str() ); |
|
|
if ( requiredSize != 0 ) |
|
|
{ |
|
|
envVarC = ( char * )malloc( requiredSize * sizeof( char ) ); |
|
|
getenv_s( &requiredSize, envVarC, requiredSize, varname.c_str() ); |
|
|
} |
|
|
else |
|
|
envVarC = nullptr; |
|
|
#else |
|
|
envVarC = getenv( varname.c_str() ); |
|
|
#endif |
|
|
char *envVarC = getenv( varname.c_str() ); |
|
|
|
|
|
if ( !envVarC ) |
|
|
return defaultVal; |
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.