diff --git a/CMakeLists.txt b/CMakeLists.txt index df87a40..2ebc05e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ add_subdirectory(src) add_subdirectory(include) add_library(amqp-cpp STATIC ${SRCS}) -target_include_directories(amqp-cpp SYSTEM PUBLIC ${PROJECT_SOURCE_DIR}) +include_directories(${PROJECT_SOURCE_DIR}) install(TARGETS amqp-cpp ARCHIVE DESTINATION lib ) diff --git a/include/buffer.h b/include/buffer.h index 46ee5aa..b5268e3 100644 --- a/include/buffer.h +++ b/include/buffer.h @@ -31,6 +31,11 @@ namespace AMQP { class Buffer { public: + /** + * Destructor + */ + virtual ~Buffer() {} + /** * Total size of the buffer * @return size_t diff --git a/include/connectionhandler.h b/include/connectionhandler.h index d4ccfa4..e46fa8d 100644 --- a/include/connectionhandler.h +++ b/include/connectionhandler.h @@ -36,6 +36,11 @@ class Connection; class ConnectionHandler { public: + /** + * Destructor + */ + virtual ~ConnectionHandler() = default; + /** * Method that is called when the heartbeat frequency is negotiated * between the server and the client. You normally do not have to diff --git a/include/message.h b/include/message.h index 3d3a49d..2dd1ef7 100644 --- a/include/message.h +++ b/include/message.h @@ -20,6 +20,7 @@ */ #include "envelope.h" #include +#include /** * Set up namespace diff --git a/include/tcpconnection.h b/include/tcpconnection.h index b0ebd19..76147ee 100644 --- a/include/tcpconnection.h +++ b/include/tcpconnection.h @@ -115,7 +115,7 @@ public: /** * Destructor */ - virtual ~TcpConnection() = default; + virtual ~TcpConnection() noexcept {} /** * Process the TCP connection diff --git a/include/tcphandler.h b/include/tcphandler.h index dfbf209..7c86a4a 100644 --- a/include/tcphandler.h +++ b/include/tcphandler.h @@ -30,6 +30,11 @@ class TcpConnection; class TcpHandler { public: + /** + * Destructor + */ + virtual ~TcpHandler() {} + /** * Method that is called when the heartbeat frequency is negotiated * between the server and the client. diff --git a/src/includes.h b/src/includes.h index 6768f00..ecabe00 100644 --- a/src/includes.h +++ b/src/includes.h @@ -27,6 +27,7 @@ #include #include #include +#include // forward declarations #include "../include/classes.h" diff --git a/src/table.cpp b/src/table.cpp index 494de94..ac2fd45 100644 --- a/src/table.cpp +++ b/src/table.cpp @@ -47,7 +47,7 @@ Table::Table(const Table &table) // since a map is always ordered, we know that each element will // be inserted at the end of the new map, so we can simply use // emplace_hint and hint at insertion at the end of the map - _fields.emplace_hint(_fields.end(), std::make_pair(iter->first, iter->second->clone())); + _fields.insert(_fields.end(), std::make_pair(iter->first, iter->second->clone())); } } diff --git a/src/tcpclosed.h b/src/tcpclosed.h index c762014..cd980cd 100644 --- a/src/tcpclosed.h +++ b/src/tcpclosed.h @@ -41,7 +41,7 @@ public: /** * Destructor */ - virtual ~TcpClosed() = default; + virtual ~TcpClosed() noexcept = default; }; /** diff --git a/src/tcpconnected.h b/src/tcpconnected.h index 8701ed3..8cb827f 100644 --- a/src/tcpconnected.h +++ b/src/tcpconnected.h @@ -108,7 +108,7 @@ public: /** * Destructor */ - virtual ~TcpConnected() + virtual ~TcpConnected() noexcept { // we no longer have to monitor the socket _handler->monitor(_connection, _socket, 0); diff --git a/src/tcpresolver.h b/src/tcpresolver.h index 8ceddad..c8721e5 100644 --- a/src/tcpresolver.h +++ b/src/tcpresolver.h @@ -158,7 +158,7 @@ public: /** * Destructor */ - virtual ~TcpResolver() + virtual ~TcpResolver() noexcept { // stop monitoring the pipe filedescriptor _handler->monitor(_connection, _pipe.in(), 0);