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/bench/checkqueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bench') diff --git a/src/bench/checkqueue.cpp b/src/bench/checkqueue.cpp index 88a2a570f9..b7ae5c2d57 100644 --- a/src/bench/checkqueue.cpp +++ b/src/bench/checkqueue.cpp @@ -67,7 +67,7 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::State& state) prevector p; PrevectorJob(){ } - PrevectorJob(FastRandomContext& insecure_rand){ + explicit PrevectorJob(FastRandomContext& insecure_rand){ p.resize(insecure_rand.randrange(PREVECTOR_SIZE*2)); } bool operator()() -- cgit v1.2.3