Skip to content

Commit ace1e40

Browse files
committed
use FileStream for includes as well
1 parent b3e6b7d commit ace1e40

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

simplecpp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2926,8 +2926,9 @@ std::map<std::string, simplecpp::TokenList*> simplecpp::load(const simplecpp::To
29262926
}
29272927
continue;
29282928
}
2929+
fin.close();
29292930

2930-
TokenList *tokenlist = new TokenList(fin, fileNumbers, filename, outputList);
2931+
TokenList *tokenlist = new TokenList(fileNumbers, filename, outputList);
29312932
if (!tokenlist->front()) {
29322933
delete tokenlist;
29332934
continue;
@@ -2965,8 +2966,9 @@ std::map<std::string, simplecpp::TokenList*> simplecpp::load(const simplecpp::To
29652966
const std::string header2 = openHeader(f,dui,sourcefile,header,systemheader);
29662967
if (!f.is_open())
29672968
continue;
2969+
f.close();
29682970

2969-
TokenList *tokens = new TokenList(f, fileNumbers, header2, outputList);
2971+
TokenList *tokens = new TokenList(fileNumbers, header2, outputList);
29702972
ret[header2] = tokens;
29712973
if (tokens->front())
29722974
filelist.push_back(tokens->front());

0 commit comments

Comments
 (0)