diff options
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index b08f2515bd2..c6816a19669 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -5095,16 +5095,12 @@ Slice::Unit::scanPosition(const char* s) if(_currentLine == 0) { - if(!_topLevelFileStart) + if(currentFile != _topLevelFile) { type = Push; line.erase(idx); eraseWhiteSpace(line); } - else - { - _topLevelFileStart = false; - } } else { @@ -5491,7 +5487,7 @@ Slice::Unit::parse(const string& filename, FILE* file, bool debug, Slice::Featur _currentLine = 1; _currentIncludeLevel = 0; _featureProfile = profile; - _topLevelFileStart = true; + _topLevelFile = normalizePath(filename); pushContainer(this); pushDefinitionContext(); |