Skip to content

Commit 740b2b9

Browse files
authored
do not use stream to read file in FileDataCache::tryload() (#523)
1 parent 4db4304 commit 740b2b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

simplecpp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3022,8 +3022,7 @@ std::pair<simplecpp::FileData *, bool> simplecpp::FileDataCache::tryload(FileDat
30223022
return {id_it->second, false};
30233023
}
30243024

3025-
std::ifstream f(path);
3026-
FileData *const data = new FileData {path, TokenList(f, filenames, path, outputList)};
3025+
FileData *const data = new FileData {path, TokenList(path, filenames, outputList)};
30273026

30283027
if (dui.removeComments)
30293028
data->tokens.removeComments();

0 commit comments

Comments
 (0)