Browse Source

(cleanup) IntervalIteration.h, Measures.h: make constructors explicit

Single argument constructor may be mistakenly used as implicit
conversion constructors, which does not make sense for these classes.
master
Joachim Klein 8 years ago
parent
commit
e36562caef
  1. 2
      prism/include/IntervalIteration.h
  2. 4
      prism/include/Measures.h

2
prism/include/IntervalIteration.h

@ -37,7 +37,7 @@ private:
bool select_midpoint;
public:
IntervalIteration(int flags) {
explicit IntervalIteration(int flags) {
ensure_monotonic_from_below = (flags & 0x01);
ensure_monotonic_from_above = (flags & 0x02);
select_midpoint = (flags & 0x04);

4
prism/include/Measures.h

@ -45,7 +45,7 @@ private:
public:
/** Constructor, set relative flag */
MeasureSupNorm(bool relative) : relative(relative) {
explicit MeasureSupNorm(bool relative) : relative(relative) {
reset();
}
@ -117,7 +117,7 @@ private:
public:
/** Constructor, set relative flag */
MeasureSupNormInterval(bool relative) : relative(relative) {
explicit MeasureSupNormInterval(bool relative) : relative(relative) {
reset();
}

Loading…
Cancel
Save