Commit 6a95c34a authored by Max Kellermann's avatar Max Kellermann

fs/io/FileOutputStream: use C++11 initializers

parent ea0e6d98
...@@ -41,22 +41,20 @@ class BaseFileOutputStream : public OutputStream { ...@@ -41,22 +41,20 @@ class BaseFileOutputStream : public OutputStream {
const AllocatedPath path; const AllocatedPath path;
#ifdef WIN32 #ifdef WIN32
HANDLE handle; HANDLE handle = INVALID_HANDLE_VALUE;
#else #else
FileDescriptor fd; FileDescriptor fd = FileDescriptor::Undefined();
#endif #endif
protected: protected:
#ifdef WIN32 #ifdef WIN32
template<typename P> template<typename P>
BaseFileOutputStream(P &&_path) BaseFileOutputStream(P &&_path)
:path(std::forward<P>(_path)), :path(std::forward<P>(_path)) {}
handle(INVALID_HANDLE_VALUE) {}
#else #else
template<typename P> template<typename P>
BaseFileOutputStream(P &&_path) BaseFileOutputStream(P &&_path)
:path(std::forward<P>(_path)), :path(std::forward<P>(_path)) {}
fd(FileDescriptor::Undefined()) {}
#endif #endif
~BaseFileOutputStream() { ~BaseFileOutputStream() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment