aboutsummaryrefslogtreecommitdiff
path: root/src/support/lockedpool.h
diff options
context:
space:
mode:
authorpracticalswift <[email protected]>2017-08-01 12:22:41 +0200
committerpracticalswift <[email protected]>2017-08-16 16:33:25 +0200
commit64fb0ac016c7fd01c60c39af60f6431bac57f9ee (patch)
tree8d8523dd68167f9a6299dd92cc9dd5e0fd162b23 /src/support/lockedpool.h
parentMerge #10901: Fix constness of ArgsManager methods (diff)
downloaddiscoin-64fb0ac016c7fd01c60c39af60f6431bac57f9ee.tar.xz
discoin-64fb0ac016c7fd01c60c39af60f6431bac57f9ee.zip
Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
Diffstat (limited to 'src/support/lockedpool.h')
-rw-r--r--src/support/lockedpool.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/support/lockedpool.h b/src/support/lockedpool.h
index 7641d8147..cecbdec1a 100644
--- a/src/support/lockedpool.h
+++ b/src/support/lockedpool.h
@@ -150,7 +150,7 @@ public:
* If this callback is provided and returns false, the allocation fails (hard fail), if
* it returns true the allocation proceeds, but it could warn.
*/
- LockedPool(std::unique_ptr<LockedPageAllocator> allocator, LockingFailed_Callback lf_cb_in = nullptr);
+ explicit LockedPool(std::unique_ptr<LockedPageAllocator> allocator, LockingFailed_Callback lf_cb_in = nullptr);
~LockedPool();
/** Allocate size bytes from this arena.
@@ -217,7 +217,7 @@ public:
}
private:
- LockedPoolManager(std::unique_ptr<LockedPageAllocator> allocator);
+ explicit LockedPoolManager(std::unique_ptr<LockedPageAllocator> allocator);
/** Create a new LockedPoolManager specialized to the OS */
static void CreateInstance();