aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-05-11 16:02:15 +0100
committerfanquake <fanquake@gmail.com>2022-05-17 17:18:58 +0100
commit7aa40f55636be565441a9e0af8de0a346bfa4da2 (patch)
treecec851bcb9c00ea0d37da6b96cc5c65f2366862a /src/httpserver.cpp
parentd5d40d59f8d12cf53c5ad1ce9710f3f108cec386 (diff)
downloadbitcoin-7aa40f55636be565441a9e0af8de0a346bfa4da2.tar.xz
refactor: use C++11 default initializers
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index dba66becc0..b9a1fc672a 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -73,19 +73,16 @@ private:
Mutex cs;
std::condition_variable cond GUARDED_BY(cs);
std::deque<std::unique_ptr<WorkItem>> queue GUARDED_BY(cs);
- bool running GUARDED_BY(cs);
+ bool running GUARDED_BY(cs){true};
const size_t maxDepth;
public:
- explicit WorkQueue(size_t _maxDepth) : running(true),
- maxDepth(_maxDepth)
+ explicit WorkQueue(size_t _maxDepth) : maxDepth(_maxDepth)
{
}
/** Precondition: worker threads have all stopped (they have been joined).
*/
- ~WorkQueue()
- {
- }
+ ~WorkQueue() = default;
/** Enqueue a work item */
bool Enqueue(WorkItem* item) EXCLUSIVE_LOCKS_REQUIRED(!cs)
{