mirror of
https://github.com/fmang/opustags.git
synced 2025-02-03 13:55:13 +01:00
Compare commits
2 Commits
ed39938567
...
dd4704ffda
Author | SHA1 | Date | |
---|---|---|---|
|
dd4704ffda | ||
|
fb3eb7298d |
@ -124,8 +124,14 @@ using byte_string_view = std::basic_string_view<uint8_t>;
|
||||
*
|
||||
* It implictly converts from an already opened FILE*.
|
||||
*/
|
||||
struct file : std::unique_ptr<FILE, decltype(&fclose)> {
|
||||
file(FILE* f = nullptr) : std::unique_ptr<FILE, decltype(&fclose)>(f, &fclose) {}
|
||||
struct fclose_deleter {
|
||||
void operator()(FILE *f) const noexcept {
|
||||
fclose(f);
|
||||
}
|
||||
};
|
||||
|
||||
struct file : std::unique_ptr<FILE, struct fclose_deleter> {
|
||||
file(FILE* f = nullptr) : std::unique_ptr<FILE, struct fclose_deleter>(f) {}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user