output: close output files

This commit is contained in:
Matthias Schiffer 2015-04-09 04:00:05 +02:00
parent 923ce33be1
commit 031fdb010e
2 changed files with 6 additions and 0 deletions

View file

@ -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() { void output_t::emit_tokens() {
if (tokens.empty()) if (tokens.empty())
return; return;

View file

@ -74,6 +74,7 @@ private:
public: public:
output_t(const generator_t *generator0, const char *header, const char *source); output_t(const generator_t *generator0, const char *header, const char *source);
~output_t();
void write(); void write();
}; };