summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePack/Parser.cpp')
-rw-r--r--cpp/src/IcePack/Parser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp
index af3acfb8c39..6f5d9d27d7d 100644
--- a/cpp/src/IcePack/Parser.cpp
+++ b/cpp/src/IcePack/Parser.cpp
@@ -146,7 +146,8 @@ IcePack::Parser::getInput(char* buf, int& result, int maxSize)
}
else
{
- result = std::min(maxSize, static_cast<int>(_commands.length()));
+ // COMPILERBUG: Stupid Visual C++ defined min and max as macros
+ result = _MIN(maxSize, static_cast<int>(_commands.length()));
strncpy(buf, _commands.c_str(), result);
_commands.erase(0, result);
if (_commands.empty())
@@ -202,7 +203,7 @@ IcePack::Parser::getInput(char* buf, int& result, int maxSize)
}
}
- result = strlen(line);
+ result = line.length();
if (result > maxSize)
{
error("input line too long");
@@ -348,7 +349,7 @@ IcePack::Parser::parse(FILE* file, bool debug)
parser = this;
_errors = 0;
- _commands.clear();
+ _commands.empty();
yyin = file;
assert(yyin);