Skip to content

Commit

Permalink
Unify formatting in Environ source files
Browse files Browse the repository at this point in the history
  • Loading branch information
jstone-lucasfilm committed Mar 5, 2019
1 parent 0dabfb1 commit 7f8ce6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions source/MaterialXFormat/Environ.cpp
Original file line number Diff line number Diff line change
@@ -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.
//

Expand All @@ -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<char> buffer(size);
GetEnvironmentVariable(name.c_str(), buffer.data(), size);
Expand Down Expand Up @@ -52,4 +51,4 @@ bool removeEnviron(const string& name)
#endif
}

} // namespace MaterialX
} // namespace MaterialX
2 changes: 1 addition & 1 deletion source/MaterialXFormat/Environ.h
Original file line number Diff line number Diff line change
@@ -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.
//

Expand Down

0 comments on commit 7f8ce6b

Please sign in to comment.