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