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

Lines changed: 6 additions & 2 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 3 additions & 4 deletions
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

Lines changed: 1 addition & 2 deletions
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

0 commit comments

Comments
 (0)