Skip to content

Commit 160250e

Browse files
committed
Builds on Ubuntu 22.04 Jammy no warnings
1 parent 0cfd678 commit 160250e

27 files changed

+45
-38
lines changed

CMakeLists.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ endif()
100100
message(STATUS "Boost components: ${boost_components}")
101101
find_package(Boost REQUIRED ${boost_components})
102102

103+
# Ignore Boost internal deprecation
104+
add_definitions("-DBOOST_ALLOW_DEPRECATED_HEADERS")
105+
add_definitions("-DBOOST_BIND_GLOBAL_PLACEHOLDERS")
106+
103107
## Translate cmake's new "Boost::blah" library naming format to a normal "libboost_blah" name that can be passed to the linker.
104108
## TODO(bz): Hunt down anyone who makes stupid changes like this and make them suffer.
105109
set(boost_libraries "")
@@ -118,8 +122,8 @@ set(exported_link_dirs ${exported_link_dirs} ${Boost_LIBRARY_DIRS})
118122

119123
## Eigen3
120124
find_package(Eigen3 REQUIRED)
121-
include_directories(${EIGEN_INCLUDE_DIRS})
122-
set(exported_include_dirs ${exported_include_dirs} ${EIGEN_INCLUDE_DIRS})
125+
include_directories(${EIGEN3_INCLUDE_DIRS})
126+
set(exported_include_dirs ${exported_include_dirs} ${EIGEN3_INCLUDE_DIRS})
123127

124128

125129
## curses

examples/ex08_teach_and_play.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
#include <string>
1111

1212
#include <boost/ref.hpp>
13-
#include <boost/bind.hpp>
13+
#include <boost/bind/bind.hpp>
14+
using namespace boost::placeholders;
1415
#include <boost/tuple/tuple.hpp>
1516

1617
#define EIGEN_USE_NEW_STDVECTOR

examples/ex10_haptics.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
* Author: dc
66
*/
77

8-
#include <boost/bind.hpp>
8+
#include <boost/bind/bind.hpp>
9+
using namespace boost::placeholders;
910
#include <boost/tuple/tuple.hpp>
1011

1112
#include <barrett/exception.h>

include/barrett/bus/can_socket.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ class CANSocket : public CommunicationsBus {
5858
/** CANSocket() Constructors
5959
*/
6060
CANSocket();
61-
CANSocket(int port) throw(std::runtime_error);
61+
CANSocket(int port);
6262
~CANSocket();
6363
/** getMutex() method gets and locks interthread data exchange assuring nothing critical is happening in either thread.
6464
*/
6565
virtual thread::RealTimeMutex& getMutex() const { return mutex; }
6666
/** open() method creates socket communication on a specific port.
6767
*/
68-
virtual void open(int port) throw(std::logic_error, std::runtime_error);
68+
virtual void open(int port);
6969
/** close() method destorys socket communication port.
7070
*/
7171
virtual void close();

include/barrett/log/detail/real_time_writer-inl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
#include <fstream>
3737
#include <string>
3838

39-
#include <boost/bind.hpp>
39+
#include <boost/bind/bind.hpp>
40+
using namespace boost::placeholders;
4041
#include <boost/thread.hpp>
4142
#include <boost/lexical_cast.hpp>
4243

include/barrett/math/detail/matrix-inl.h

-2
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,13 @@ inline Matrix<R,C, Units> Matrix<R,C, Units>::unserialize(char* source)
178178

179179
template<int R, int C, typename Units>
180180
inline void Matrix<R,C, Units>::copyTo(gsl_type* gslType) const
181-
throw(std::logic_error)
182181
{
183182
checkSize(gslType);
184183
copyToHelper(gslType);
185184
}
186185

187186
template<int R, int C, typename Units>
188187
inline void Matrix<R,C, Units>::copyFrom(const gsl_type* gslType)
189-
throw(std::logic_error)
190188
{
191189
checkSize(gslType);
192190
copyFromHelper(gslType);

include/barrett/math/matrix.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ class Matrix : public Eigen::Matrix<double, R,C, (C==1 && R>1) ? Eigen::ColMajor
132132
void serialize(char* dest) const;
133133
static Matrix<R,C, Units> unserialize(char* source);
134134

135-
void copyTo(gsl_type* gslType) const throw(std::logic_error);
136-
void copyFrom(const gsl_type* gslType) throw(std::logic_error);
135+
void copyTo(gsl_type* gslType) const;
136+
void copyFrom(const gsl_type* gslType);
137137

138138
void copyFrom(const libconfig::Setting& setting);
139139

include/barrett/products/detail/puck-inl.h

-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ int Puck::receiveGetPropertyReply(const bus::CommunicationsBus& bus, int id, int
161161
}
162162

163163
inline int Puck::getPropertyId(enum Property prop, enum PuckType pt, int fwVers)
164-
throw(std::runtime_error)
165164
{
166165
int propId = getPropertyIdNoThrow(prop, pt, fwVers);
167166
if (propId == -1) {

include/barrett/products/puck.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Puck {
6666
// include the generated file containing the list of available properties
6767
# include <barrett/products/detail/property_list.h>
6868
static const char* getPropertyStr(enum Property prop);
69-
static enum Property getPropertyEnum(const char* str) throw(std::invalid_argument);
69+
static enum Property getPropertyEnum(const char* str);
7070
static enum Property getPropertyEnumNoThrow(const char* str);
7171

7272

@@ -90,7 +90,7 @@ class Puck {
9090
bool respondsToProperty(enum Property prop) const {
9191
return respondsToProperty(prop, effectiveType, vers);
9292
}
93-
int getPropertyId(enum Property prop) const throw(std::runtime_error) {
93+
int getPropertyId(enum Property prop) const {
9494
return getPropertyId(prop, effectiveType, vers);
9595
}
9696
int getPropertyIdNoThrow(enum Property prop) const {
@@ -131,8 +131,7 @@ class Puck {
131131
static bool respondsToProperty(enum Property prop, enum PuckType pt, int fwVers) {
132132
return getPropertyIdNoThrow(prop, pt, fwVers) != -1;
133133
}
134-
static int getPropertyId(enum Property prop, enum PuckType pt, int fwVers)
135-
throw(std::runtime_error);
134+
static int getPropertyId(enum Property prop, enum PuckType pt, int fwVers);
136135
static int getPropertyIdNoThrow(enum Property prop, enum PuckType pt, int fwVers);
137136

138137

include/barrett/systems/converter.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ class Converter : public System, public SingleOutput<OutputType> {
5656
Conversion<OutputType>* conversion);
5757

5858
template<typename T>
59-
void connectInputTo(System::Output<T>& output) //NOLINT: non-const reference for syntax
60-
throw(std::invalid_argument);
59+
void connectInputTo(System::Output<T>& output); //NOLINT: non-const reference for syntax
6160

6261
template<typename T>
6362
bool connectInputToNoThrow(System::Output<T>& output); //NOLINT: non-const reference for syntax

include/barrett/systems/detail/converter-inl.h

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ template<typename OutputType>
6666
template<typename T>
6767
void Converter<OutputType>::connectInputTo(
6868
System::Output<T>& output)
69-
throw(std::invalid_argument)
7069
{
7170
if ( !connectInputToNoThrow(output) ) {
7271
throw std::invalid_argument(

include/barrett/systems/detail/summer-polarity-inl.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ Summer<T, numInputs, RequiresAlignment>::Polarity::Polarity() : // default: all
4444
}
4545

4646
template<typename T, size_t numInputs, bool RequiresAlignment>
47-
Summer<T, numInputs, RequiresAlignment>::Polarity::Polarity(std::string polarityStr)
48-
throw(std::invalid_argument) :
47+
Summer<T, numInputs, RequiresAlignment>::Polarity::Polarity(std::string polarityStr) :
4948
polarity()
5049
{
5150
if (polarityStr.size() != numInputs) {

include/barrett/systems/detail/wam-inl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
#include <unistd.h> // usleep
3333

3434
#include <boost/ref.hpp>
35-
#include <boost/bind.hpp>
35+
#include <boost/bind/bind.hpp>
36+
using namespace boost::placeholders;
3637
#include <boost/thread.hpp>
3738

3839
#define EIGEN_USE_NEW_STDVECTOR

include/barrett/systems/summer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected: boost::array<Input<T>*, numInputs> inputs;
6161
class Polarity {
6262
public:
6363
Polarity(); // default: all positive
64-
explicit Polarity(std::string polarityStr) throw(std::invalid_argument);
64+
explicit Polarity(std::string polarityStr);
6565
explicit Polarity(const std::bitset<numInputs>& inputPolarity) :
6666
polarity(inputPolarity) {}
6767
virtual ~Polarity() {}

programs/zerocal.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class AdjustJointStep : public CalibrationStep {
278278

279279
// Adjust the offset
280280
default:
281-
mvprintw(line++,left, "Use arrow keys to adjust the Joint %d offset.", j+1);
281+
mvprintw(line++,left, "Use arrow keys to adjust the Joint %ld offset.", j+1);
282282
sa.off();
283283
line++;
284284
mvprintw(line++,left, " ");

sandbox/log_hand_jp.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
#include <unistd.h>
1212
#include <native/timer.h>
1313

14-
#include <boost/bind.hpp>
14+
#include <boost/bind/bind.hpp>
15+
using namespace boost::placeholders;
1516
#include <boost/thread.hpp>
1617

1718
#include <barrett/units.h>

sandbox/moveToPose.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#include <iostream>
99
#include <cassert>
1010

11-
#include <boost/bind.hpp>
11+
#include <boost/bind/bind.hpp>
12+
using namespace boost::placeholders;
1213
#include <boost/ref.hpp>
1314
#include <Eigen/Geometry>
1415

sandbox/quaternion_interpolation.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#include <iostream>
99
#include <cassert>
1010

11-
#include <boost/bind.hpp>
11+
#include <boost/bind/bind.hpp>
12+
using namespace boost::placeholders;
1213
#include <boost/ref.hpp>
1314
#include <Eigen/Geometry>
1415

sandbox/teach_and_play/play.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#include <string>
99
#include <boost/tuple/tuple.hpp>
1010
#include <boost/ref.hpp>
11-
#include <boost/bind.hpp>
11+
#include <boost/bind/bind.hpp>
12+
using namespace boost::placeholders;
1213
#include <boost/thread.hpp>
1314
//#include <boost/filesystem.hpp>
1415
#include <boost/lexical_cast.hpp>

sandbox/teach_and_play/teach.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
#include <fstream>
1212

1313
#include <boost/ref.hpp>
14-
#include <boost/bind.hpp>
14+
#include <boost/bind/bind.hpp>
15+
using namespace boost::placeholders;
1516
#include <boost/tuple/tuple.hpp>
1617
#include <boost/thread.hpp>
1718
#include <curses.h>

sandbox/teach_with_hand.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
#include <string>
1111

1212
#include <boost/ref.hpp>
13-
#include <boost/bind.hpp>
13+
#include <boost/bind/bind.hpp>
14+
using namespace boost::placeholders;
1415
#include <boost/tuple/tuple.hpp>
1516
#include <boost/thread.hpp>
1617

sandbox/wrist_teach_with_hand.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
#include <string>
1111

1212
#include <boost/ref.hpp>
13-
#include <boost/bind.hpp>
13+
#include <boost/bind/bind.hpp>
14+
using namespace boost::placeholders;
1415
#include <boost/tuple/tuple.hpp>
1516
#include <boost/thread.hpp>
1617

src/bus/can_socket-linux.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ CANSocket::CANSocket() :
7171
{
7272
}
7373

74-
CANSocket::CANSocket(int port) throw(std::runtime_error) :
74+
CANSocket::CANSocket(int port) :
7575
mutex(), handle(new detail::can_handle)
7676
{
7777
open(port);
@@ -85,7 +85,7 @@ CANSocket::~CANSocket()
8585
}
8686

8787

88-
void CANSocket::open(int port) throw(std::logic_error, std::runtime_error)
88+
void CANSocket::open(int port)
8989
{
9090
if (isOpen()) {
9191
(logMessage("CANSocket::%s(): This object is already associated with a CAN port.")

src/bus/can_socket-rtcan.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ CANSocket::CANSocket() :
6666
{
6767
}
6868

69-
CANSocket::CANSocket(int port) throw(std::runtime_error) :
69+
CANSocket::CANSocket(int port) :
7070
mutex(), handle(new detail::can_handle)
7171
{
7272
open(port);
@@ -80,7 +80,7 @@ CANSocket::~CANSocket()
8080
}
8181

8282

83-
void CANSocket::open(int port) throw(std::logic_error, std::runtime_error)
83+
void CANSocket::open(int port)
8484
{
8585
if (isOpen()) {
8686
(logMessage("CANSocket::%s(): This object is already associated with a CAN port.")

src/products/property_list.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ enum Puck::Property Puck::getPropertyEnumNoThrow(const char* str) {
231231
}
232232

233233
enum Puck::Property Puck::getPropertyEnum(const char* str)
234-
throw(std::invalid_argument)
235234
{
236235
enum Property prop = getPropertyEnumNoThrow(str);
237236
if (prop == (enum Property) -1) {

src/products/property_list.py

-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ def binarySearchHelper(pt, vers, indentation, low, high):
316316
}
317317
318318
enum Puck::Property Puck::getPropertyEnum(const char* str)
319-
throw(std::invalid_argument)
320319
{
321320
enum Property prop = getPropertyEnumNoThrow(str);
322321
if (prop == -1) {

src/systems/real_time_execution_manager.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939

4040
#include <errno.h>
4141

42-
#include <boost/bind.hpp>
42+
#include <boost/bind/bind.hpp>
43+
using namespace boost::placeholders;
4344
#include <boost/lexical_cast.hpp>
4445

4546
#include <barrett/os.h>

0 commit comments

Comments
 (0)