fix parser destructor

This commit is contained in:
ado 2021-01-17 15:22:50 +01:00
parent f6b0201bf5
commit 4932138fba

View File

@ -3,9 +3,9 @@
#include "converter.hpp" #include "converter.hpp"
#include "extract.hpp" #include "extract.hpp"
#include "restrictions.hpp" #include "restrictions.hpp"
#include <cstdlib>
#include <cstring> #include <cstring>
#include <optional> #include <optional>
#include <cstdlib>
#include <string> #include <string>
#include <vector> #include <vector>
@ -29,8 +29,10 @@ public:
} }
~parser() { ~parser() {
if (file_) {
fclose(file_); fclose(file_);
} }
}
bool valid() const { bool valid() const {
return (error_mode_ == error_mode::error_string) ? string_error_.empty() return (error_mode_ == error_mode::error_string) ? string_error_.empty()