mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 13:05:20 +01:00
fix parser destructor
This commit is contained in:
parent
f6b0201bf5
commit
4932138fba
@ -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,7 +29,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~parser() {
|
~parser() {
|
||||||
fclose(file_);
|
if (file_) {
|
||||||
|
fclose(file_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool valid() const {
|
bool valid() const {
|
||||||
@ -135,8 +137,8 @@ public:
|
|||||||
auto merged_values =
|
auto merged_values =
|
||||||
std::tuple_cat(std::move(values_),
|
std::tuple_cat(std::move(values_),
|
||||||
std::tuple<T>{parser_.valid()
|
std::tuple<T>{parser_.valid()
|
||||||
? std::forward<T>(new_value)
|
? std::forward<T>(new_value)
|
||||||
: std::nullopt});
|
: std::nullopt});
|
||||||
return {std::move(merged_values), parser_};
|
return {std::move(merged_values), parser_};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user