From 6a95c34a81bc30ce2fe7f83b7028b8dd6bf0997c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 15 Aug 2016 22:34:53 +0200 Subject: [PATCH] fs/io/FileOutputStream: use C++11 initializers --- src/fs/io/FileOutputStream.hxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/fs/io/FileOutputStream.hxx b/src/fs/io/FileOutputStream.hxx index 9d8e0ad16..aae647353 100644 --- a/src/fs/io/FileOutputStream.hxx +++ b/src/fs/io/FileOutputStream.hxx @@ -41,22 +41,20 @@ class BaseFileOutputStream : public OutputStream { const AllocatedPath path; #ifdef WIN32 - HANDLE handle; + HANDLE handle = INVALID_HANDLE_VALUE; #else - FileDescriptor fd; + FileDescriptor fd = FileDescriptor::Undefined(); #endif protected: #ifdef WIN32 template BaseFileOutputStream(P &&_path) - :path(std::forward

(_path)), - handle(INVALID_HANDLE_VALUE) {} + :path(std::forward

(_path)) {} #else template BaseFileOutputStream(P &&_path) - :path(std::forward

(_path)), - fd(FileDescriptor::Undefined()) {} + :path(std::forward

(_path)) {} #endif ~BaseFileOutputStream() {