From e1ffc7d3caae0cc239b9f576c92f7ee3bc3fd967 Mon Sep 17 00:00:00 2001 From: firewave Date: Fri, 29 Aug 2025 18:19:04 +0200 Subject: [PATCH] do not use stream to read file in `FileDataCache::tryload()` --- simplecpp.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/simplecpp.cpp b/simplecpp.cpp index 23aa7387..84e4b54b 100644 --- a/simplecpp.cpp +++ b/simplecpp.cpp @@ -3022,8 +3022,7 @@ std::pair simplecpp::FileDataCache::tryload(FileDat return {id_it->second, false}; } - std::ifstream f(path); - FileData *const data = new FileData {path, TokenList(f, filenames, path, outputList)}; + FileData *const data = new FileData {path, TokenList(path, filenames, outputList)}; if (dui.removeComments) data->tokens.removeComments();