diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-04-09 04:00:05 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-04-09 04:00:05 +0200 |
commit | 031fdb010e2e0565fa3c8e3d0b67e084233d2d9d (patch) | |
tree | c8f78ae029c88d4d1f1dbf379bf764e599bc7d6a /src | |
parent | 923ce33be1e33b2feda2839b61abca76ee3fcd90 (diff) | |
download | solar-031fdb010e2e0565fa3c8e3d0b67e084233d2d9d.tar solar-031fdb010e2e0565fa3c8e3d0b67e084233d2d9d.zip |
output: close output files
Diffstat (limited to 'src')
-rw-r--r-- | src/output.cpp | 5 | ||||
-rw-r--r-- | src/output.hpp | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/output.cpp b/src/output.cpp index d14b1b9..cc9d5f3 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -58,6 +58,11 @@ output_t::output_t(const generator_t *generator0, const char *header, const char } } +output_t::~output_t() { + std::fclose(header_file); + std::fclose(source_file); +} + void output_t::emit_tokens() { if (tokens.empty()) return; diff --git a/src/output.hpp b/src/output.hpp index 913f123..e3d5b99 100644 --- a/src/output.hpp +++ b/src/output.hpp @@ -74,6 +74,7 @@ private: public: output_t(const generator_t *generator0, const char *header, const char *source); + ~output_t(); void write(); }; |