diff --git a/source/MaterialXFormat/Environ.cpp b/source/MaterialXFormat/Environ.cpp index 63ec7b7738..4a9ef04d05 100644 --- a/source/MaterialXFormat/Environ.cpp +++ b/source/MaterialXFormat/Environ.cpp @@ -1,5 +1,5 @@ // -// TM & (c) 2019 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd. +// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd. // All rights reserved. See LICENSE.txt for license. // @@ -18,8 +18,7 @@ namespace MaterialX string getEnviron(const string& name) { #if defined(_WIN32) - uint32_t size = GetEnvironmentVariable(name.c_str(), nullptr, 0); - if (size) + if (uint32_t size = GetEnvironmentVariable(name.c_str(), nullptr, 0)) { vector buffer(size); GetEnvironmentVariable(name.c_str(), buffer.data(), size); @@ -52,4 +51,4 @@ bool removeEnviron(const string& name) #endif } -} // namespace MaterialX +} // namespace MaterialX diff --git a/source/MaterialXFormat/Environ.h b/source/MaterialXFormat/Environ.h index ab7ecc6eb7..ecd0d165be 100644 --- a/source/MaterialXFormat/Environ.h +++ b/source/MaterialXFormat/Environ.h @@ -1,5 +1,5 @@ // -// TM & (c) 2019 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd. +// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd. // All rights reserved. See LICENSE.txt for license. //