From 39ffec281af577c766c619d568f7a7051d108b00 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 25 Apr 2018 09:30:56 +0200 Subject: misc: mark constructors as explicit Set 218 constructors as explicit to avoid implicit usage. Fix for cppcheck warning: Class has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided. For more information check: https://www.codeproject.com/Articles/28663/Explicit-Constructor-in-C Signed-off-by: Danny Al-Gaaf --- src/test/librgw_file_gp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/librgw_file_gp.cc') diff --git a/src/test/librgw_file_gp.cc b/src/test/librgw_file_gp.cc index e48952a85d8..80a165418a4 100644 --- a/src/test/librgw_file_gp.cc +++ b/src/test/librgw_file_gp.cc @@ -78,7 +78,7 @@ namespace { std::vector pages; struct iovec* iovs; - ZPageSet(int n) { + explicit ZPageSet(int n) { pages.reserve(n); iovs = (struct iovec*) calloc(n, sizeof(struct iovec)); for (int page_ix = 0; page_ix < n; ++page_ix) { -- cgit v1.2.3