diff options
| author | 2022-09-03 20:47:42 +0100 | |
|---|---|---|
| committer | 2022-09-03 20:47:42 +0100 | |
| commit | 85ed0405dffc321bb2a27071816dbf5c27ed9cf3 (patch) | |
| tree | 3d3cd713a2530926487c7d3547af6cc6df9ae25c /src/threadsocket.cpp | |
| parent | Clean up the Windows build process and remove some legacy code. (diff) | |
Initialize some variables inline instead of in the constructor.
Diffstat (limited to 'src/threadsocket.cpp')
| -rw-r--r-- | src/threadsocket.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/threadsocket.cpp b/src/threadsocket.cpp index 86b36eac0..323376b98 100644 --- a/src/threadsocket.cpp +++ b/src/threadsocket.cpp @@ -29,7 +29,9 @@ class ThreadSignalSocket final : public EventHandler { - SocketThread* parent; +private: + SocketThread* parent = nullptr; + public: ThreadSignalSocket(SocketThread* p, int newfd) : parent(p) { @@ -67,10 +69,10 @@ public: SocketThread::SocketThread() { - socket = nullptr; int fd = eventfd(0, EFD_NONBLOCK); if (fd < 0) throw CoreException("Could not create pipe " + std::string(strerror(errno))); + socket = new ThreadSignalSocket(this, fd); } #else |
