diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2018-04-25 09:30:56 +0200 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2018-05-02 17:01:58 +0200 |
commit | 39ffec281af577c766c619d568f7a7051d108b00 (patch) | |
tree | 79c527cc3871b9b113f1aabffb3cef9647ebb7be /src/test/librgw_file_gp.cc | |
parent | Merge PR #21762 into master (diff) | |
download | ceph-39ffec281af577c766c619d568f7a7051d108b00.tar.xz ceph-39ffec281af577c766c619d568f7a7051d108b00.zip |
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 <danny.al-gaaf@bisect.de>
Diffstat (limited to 'src/test/librgw_file_gp.cc')
-rw-r--r-- | src/test/librgw_file_gp.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<ZPage*> 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) { |