Replace boost features with C++11 equivalents (#58)

* Replace boost features with C++11 equivalents

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Include <cmath> in util.h

Needed for std::abs

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
Jacob Perron 2020-11-01 18:05:17 -08:00 committed by GitHub
parent 850b011a55
commit 2b9591f0f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 95 additions and 87 deletions

View file

@ -32,9 +32,8 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef CREATE_DATA_H
#define CREATE_DATA_H
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#include <map>
#include <memory>
#include <vector>
#include "create/packet.h"
@ -43,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
namespace create {
class Data {
private:
std::map<uint8_t, boost::shared_ptr<Packet> > packets;
std::map<uint8_t, std::shared_ptr<Packet> > packets;
uint32_t totalDataBytes;
std::vector<uint8_t> ids;
@ -52,7 +51,7 @@ namespace create {
~Data();
bool isValidPacketID(const uint8_t id) const;
boost::shared_ptr<Packet> getPacket(const uint8_t id);
std::shared_ptr<Packet> getPacket(const uint8_t id);
void validateAll();
uint32_t getTotalDataBytes() const;
uint8_t getNumPackets() const;