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 {
const AllocatedPath path;
#ifdef WIN32
HANDLE handle;
HANDLE handle = INVALID_HANDLE_VALUE;
#else
FileDescriptor fd;
FileDescriptor fd = FileDescriptor::Undefined();
#endif
protected:
#ifdef WIN32
template<typename P>
BaseFileOutputStream(P &&_path)
:path(std::forward<P>(_path)),
handle(INVALID_HANDLE_VALUE) {}
:path(std::forward<P>(_path)) {}
#else
template<typename P>
BaseFileOutputStream(P &&_path)
:path(std::forward<P>(_path)),
fd(FileDescriptor::Undefined()) {}
:path(std::forward<P>(_path)) {}
#endif
~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