From 8d8926bab3b21f0bbf0b84e7259bf91f99d3cc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Wed, 22 May 2024 06:55:53 +0200 Subject: [PATCH] read headers via `FileStream` (#353) --- simplecpp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simplecpp.cpp b/simplecpp.cpp index 47bb78f..fb5a047 100755 --- a/simplecpp.cpp +++ b/simplecpp.cpp @@ -3463,7 +3463,8 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL std::ifstream f; header2 = openHeader(f, dui, rawtok->location.file(), header, systemheader); if (f.is_open()) { - TokenList * const tokens = new TokenList(f, files, header2, outputList); + f.close(); + TokenList * const tokens = new TokenList(header2, files, outputList); if (dui.removeComments) tokens->removeComments(); filedata[header2] = tokens;