From 4059e1918e45b5e7d0324abfd222a7f326a2368c Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 25 Oct 2018 23:33:26 +0000 Subject: [PATCH] Mark libdivide constructors explicit git-svn-id: https://svn.eduke32.com/eduke32@7128 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/include/libdivide.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/build/include/libdivide.h b/source/build/include/libdivide.h index 6ddc47531..f5011a102 100644 --- a/source/build/include/libdivide.h +++ b/source/build/include/libdivide.h @@ -1863,13 +1863,13 @@ namespace libdivide_internal { DenomType denom; // Constructor that takes a divisor value, and applies the gen function - base(IntType d) : denom(gen_func(d)) { } + explicit base(IntType d) : denom(gen_func(d)) { } // Default constructor to allow uninitialized uses in e.g. arrays base() {} // Needed for unswitch - base(const DenomType& d) : denom(d) { } + explicit base(const DenomType& d) : denom(d) { } IntType perform_divide(IntType val) const { return do_func(val, &denom); @@ -1977,11 +1977,11 @@ private: friend divider unswitch(const divider & d); // Constructor used by the unswitch friend - divider(const div_t& denom) : div(denom) { } + explicit divider(const div_t& denom) : div(denom) { } public: // Ordinary constructor that takes the divisor as a parameter - divider(T n) : div(n) { } + explicit divider(T n) : div(n) { } // Default constructor. We leave this deliberately undefined so that // creating an array of divider and then initializing them