Skip to content

Commit

Permalink
Disable -Wdeprecated-declarations warnings in deprecated parts
Browse files Browse the repository at this point in the history
  • Loading branch information
drdanz committed Oct 17, 2016
1 parent 6ad8805 commit c5b8f28
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libYARP_dev/include/yarp/dev/TestMotor.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ class YARP_dev_API yarp::dev::TestMotor : public DeviceDriver,
}

#ifndef YARP_NO_DEPRECATED // since YARP 2.3.65
#if !defined(_MSC_VER)
// On the other compilers the warning is disabled only here.
YARP_WARNING_PUSH
YARP_DISABLE_DEPRECATED_WARNING
#endif
YARP_DEPRECATED virtual bool setPositionMode() {
posMode = true;
return true;
Expand All @@ -332,6 +337,9 @@ class YARP_dev_API yarp::dev::TestMotor : public DeviceDriver,
posMode = false;
return false;
}
#if !defined(_MSC_VER)
YARP_WARNING_POP
#endif
#endif // YARP_NO_DEPRECATED
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4272,11 +4272,18 @@ class yarp::dev::RemoteControlBoard :
}

#ifndef YARP_NO_DEPRECATED // since YARP 2.3.65
#if !defined(_MSC_VER)
YARP_WARNING_PUSH
YARP_DISABLE_DEPRECATED_WARNING
#endif
YARP_DEPRECATED virtual bool setPositionMode() { return set1V(VOCAB_POSITION_MODE); }
YARP_DEPRECATED virtual bool setVelocityMode() { return set1V(VOCAB_VELOCITY_MODE); }
YARP_DEPRECATED virtual bool setTorqueMode() { return set1V(VOCAB_TORQUE_MODE); }
YARP_DEPRECATED virtual bool setOpenLoopMode() { return set1V(VOCAB_OPENLOOP_MODE); }
YARP_DEPRECATED virtual bool setPositionDirectMode() { return set1V(VOCAB_POSITION_DIRECT); }
#if !defined(_MSC_VER)
YARP_WARNING_PUSH
#endif
#endif // YARP_NO_DEPRECATED

};
Expand Down

0 comments on commit c5b8f28

Please sign in to comment.