Commit 4c1d29c8 authored by Max Kellermann's avatar Max Kellermann

lib/nfs/FileReader: use C++11 initializers

parent 0db7a0c9
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <sys/stat.h> #include <sys/stat.h>
NfsFileReader::NfsFileReader() NfsFileReader::NfsFileReader()
:DeferredMonitor(nfs_get_event_loop()), state(State::INITIAL) :DeferredMonitor(nfs_get_event_loop())
{ {
} }
......
...@@ -54,7 +54,7 @@ class NfsFileReader : NfsLease, NfsCallback, DeferredMonitor { ...@@ -54,7 +54,7 @@ class NfsFileReader : NfsLease, NfsCallback, DeferredMonitor {
IDLE, IDLE,
}; };
State state; State state = State::INITIAL;
std::string server, export_name; std::string server, export_name;
const char *path; const char *path;
......
...@@ -65,7 +65,7 @@ class NfsStorage final ...@@ -65,7 +65,7 @@ class NfsStorage final
Mutex mutex; Mutex mutex;
Cond cond; Cond cond;
State state; State state = State::INITIAL;
std::exception_ptr last_exception; std::exception_ptr last_exception;
public: public:
...@@ -75,8 +75,7 @@ public: ...@@ -75,8 +75,7 @@ public:
base(_base), base(_base),
server(std::move(_server)), server(std::move(_server)),
export_name(std::move(_export_name)), export_name(std::move(_export_name)),
reconnect_timer(_loop, BIND_THIS_METHOD(OnReconnectTimer)), reconnect_timer(_loop, BIND_THIS_METHOD(OnReconnectTimer)) {
state(State::INITIAL) {
nfs_init(_loop); nfs_init(_loop);
} }
......
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