storage/FileInfo: add initializing constructor

This commit is contained in:
Max Kellermann
2017-02-11 22:57:38 +01:00
parent 5cdbad7937
commit 0ccaf4a1ff
3 changed files with 16 additions and 24 deletions

View File

@@ -50,6 +50,14 @@ struct StorageFileInfo {
*/
unsigned device, inode;
StorageFileInfo() = default;
explicit constexpr StorageFileInfo(Type _type)
:type(_type),
size(0),
mtime(0),
device(0), inode(0) {}
constexpr bool IsRegular() const {
return type == Type::REGULAR;
}