Commit d985c54c authored by Joseph Mirabel's avatar Joseph Mirabel Committed by olivier stasse
Browse files

Fix deprecation and implicit-fallthrough warnings.

parent 8e84f2de
......@@ -202,7 +202,7 @@ public:
/// \brief Send messages \c msg with level \c t. Add string \c file and \c
/// line to message.
void sendMsg(const std::string &msg, MsgType t = MSG_TYPE_INFO,
const char *file = "", int line = 0);
const std::string &lineId = "");
/// \brief Specify the verbosity level of the logger.
void setLoggerVerbosityLevel(LoggerVerbosity lv) { logger_.setVerbosity(lv); }
......
......@@ -243,11 +243,13 @@ void Device::setState(const Vector &st) {
throw std::invalid_argument(
"Upper and/or lower torque bounds "
"do not match state size. Set them first with setTorqueBounds");
// fall through
case CONTROL_INPUT_ONE_INTEGRATION:
if (s != lowerVelocity_.size() || s != upperVelocity_.size())
throw std::invalid_argument("Upper and/or lower velocity bounds "
"do not match state size."
" Set them first with setVelocityBounds");
// fall through
case CONTROL_INPUT_NO_INTEGRATION:
break;
default:
......@@ -315,11 +317,13 @@ void Device::setSanityCheck(const bool &enableCheck) {
throw std::invalid_argument(
"Upper and/or lower torque bounds "
"do not match state size. Set them first with setTorqueBounds");
// fall through
case CONTROL_INPUT_ONE_INTEGRATION:
if (s != lowerVelocity_.size() || s != upperVelocity_.size())
throw std::invalid_argument(
"Upper and/or lower velocity bounds "
"do not match state size. Set them first with setVelocityBounds");
// fall through
case CONTROL_INPUT_NO_INTEGRATION:
if (s != lowerPosition_.size() || s != upperPosition_.size())
throw std::invalid_argument(
......
......@@ -360,9 +360,9 @@ void RobotUtil::display(std::ostream &os) const {
}
os << std::endl;
}
void RobotUtil::sendMsg(const std::string &msg, MsgType t, const char *file,
int line) {
logger_.sendMsg("[RobotUtil]" + msg, t, file, line);
void RobotUtil::sendMsg(const std::string &msg, MsgType t,
const std::string &lineId) {
logger_.sendMsg("[RobotUtil]" + msg, t, lineId);
}
bool base_se3_to_sot(ConstRefVector pos, ConstRefMatrix R, RefVector q_sot) {
assert(q_sot.size() == 6);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment