Visitar URL original
Small refactorizations · x29a/simplecpp@95be502 · GitHub
Skip to content

Commit 95be502

Browse files
PKEuSdanmar
authored andcommitted
Small refactorizations
1 parent 2f5b907 commit 95be502

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎simplecpp.cpp‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@
3636
#include <string>
3737

3838
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
39+
#define NOMINMAX
3940
#include <windows.h>
40-
#undef min
41-
#undef max
4241
#undef ERROR
4342
#undef TRUE
4443
#define SIMPLECPP_WINDOWS
@@ -1932,12 +1931,13 @@ static bool preprocessToken(simplecpp::TokenList &output, const simplecpp::Token
19321931
try {
19331932
*tok1 = it->second.expand(&value, tok, macros, files);
19341933
} catch (simplecpp::Macro::Error &err) {
1935-
simplecpp::Output out(files);
1936-
out.type = simplecpp::Output::SYNTAX_ERROR;
1937-
out.location = err.location;
1938-
out.msg = "failed to expand \'" + tok->str + "\', " + err.what;
1939-
if (outputList)
1934+
if (outputList) {
1935+
simplecpp::Output out(files);
1936+
out.type = simplecpp::Output::SYNTAX_ERROR;
1937+
out.location = err.location;
1938+
out.msg = "failed to expand \'" + tok->str + "\', " + err.what;
19401939
outputList->push_back(out);
1940+
}
19411941
return false;
19421942
}
19431943
output.takeTokens(value);

0 commit comments

Comments
 (0)