From 64fb0ac016c7fd01c60c39af60f6431bac57f9ee Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 1 Aug 2017 12:22:41 +0200 Subject: Declare single-argument (non-converting) constructors "explicit" In order to avoid unintended implicit conversions. --- src/support/lockedpool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/support') diff --git a/src/support/lockedpool.h b/src/support/lockedpool.h index 7641d81471..cecbdec1aa 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 allocator, LockingFailed_Callback lf_cb_in = nullptr); + explicit LockedPool(std::unique_ptr allocator, LockingFailed_Callback lf_cb_in = nullptr); ~LockedPool(); /** Allocate size bytes from this arena. @@ -217,7 +217,7 @@ public: } private: - LockedPoolManager(std::unique_ptr allocator); + explicit LockedPoolManager(std::unique_ptr allocator); /** Create a new LockedPoolManager specialized to the OS */ static void CreateInstance(); -- cgit v1.2.3