Skip to content

Commit ea0a240

Browse files
[MultiBound] Implement operator= to fix compilation warning.
1 parent 9525449 commit ea0a240

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

include/sot/core/multi-bound.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class SOT_CORE_EXPORT MultiBound {
6565
const MultiBound &m);
6666
SOT_CORE_EXPORT friend std::istream &operator>>(std::istream &is,
6767
MultiBound &m);
68+
MultiBound& operator=(const MultiBound &other);
6869
};
6970

7071
/* --------------------------------------------------------------------- */

src/task/multi-bound.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,5 +258,14 @@ std::istream &operator>>(std::istream &is, VectorMultiBound &v) {
258258
return is;
259259
}
260260

261+
MultiBound& MultiBound::operator=(const MultiBound &other) {
262+
mode = other.mode;
263+
boundSingle = other.boundSingle;
264+
boundSup = other.boundSup;
265+
boundInf = other.boundInf;
266+
boundSupSetup = other.boundSupSetup;
267+
boundInfSetup = other.boundInfSetup;
268+
return *this;
269+
}
261270
} /* namespace sot */
262271
} /* namespace dynamicgraph */

0 commit comments

Comments
 (0)