fs/io/FileOutputStream: use C++11 initializers
This commit is contained in:
parent
ea0e6d9824
commit
6a95c34a81
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user