reader_permit: reader_resources: add with_memory() factory function

To make creating reader resource with just memory more convenient and
more readable at the same time.
This commit is contained in:
Botond Dénes
2020-08-31 11:11:41 +03:00
parent 4c8ab10563
commit f10abf6e35

View File

@@ -31,6 +31,8 @@ struct reader_resources {
int count = 0;
ssize_t memory = 0;
static reader_resources with_memory(ssize_t memory) { return reader_resources(0, memory); }
reader_resources() = default;
reader_resources(int count, ssize_t memory)