@@ -640,23 +640,6 @@ static bool isStringLiteralPrefix(const std::string &str)
640640 str == " R" || str == " uR" || str == " UR" || str == " LR" || str == " u8R" ;
641641}
642642
643- void simplecpp::TokenList::lineDirective (unsigned int fileIndex_, unsigned int line, Location &location)
644- {
645- if (fileIndex_ != location.fileIndex || line >= location.line ) {
646- location.fileIndex = fileIndex_;
647- location.line = line;
648- return ;
649- }
650-
651- if (line + 2 >= location.line ) {
652- location.line = line;
653- while (cback ()->op != ' #' )
654- deleteToken (back ());
655- deleteToken (back ());
656- return ;
657- }
658- }
659-
660643static const std::string COMMENT_END (" */" );
661644
662645void simplecpp::TokenList::readfile (Stream &stream, const std::string &filename, OutputList *outputList)
@@ -726,17 +709,13 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
726709 if (!ppTok || !ppTok->number )
727710 continue ;
728711
729- const unsigned int line = std::atol (ppTok->str ().c_str ());
730- ppTok = advanceAndSkipComments (ppTok);
712+ location.line = std::atol (ppTok->str ().c_str ());
731713
732- unsigned int fileindex ;
714+ ppTok = advanceAndSkipComments (ppTok) ;
733715
734716 if (ppTok && ppTok->str ()[0 ] == ' \" ' )
735- fileindex = fileIndex (replaceAll (ppTok->str ().substr (1U , ppTok->str ().size () - 2U )," \\\\ " ," \\ " ));
736- else
737- fileindex = location.fileIndex ;
717+ location.fileIndex = fileIndex (replaceAll (ppTok->str ().substr (1U , ppTok->str ().size () - 2U )," \\\\ " ," \\ " ));
738718
739- lineDirective (fileindex, line, location);
740719 }
741720
742721 continue ;
0 commit comments