diff --git a/src/basicconsumeframe.h b/src/basicconsumeframe.h index 92072a1..0bc7888 100644 --- a/src/basicconsumeframe.h +++ b/src/basicconsumeframe.h @@ -19,7 +19,7 @@ private: * Field that is no longer used * @var uint16_t */ - uint16_t _deprecated; + uint16_t _deprecated = 0; /** * specifies the name of the queue to consume from diff --git a/src/basicgetframe.h b/src/basicgetframe.h index e333876..f7244c8 100644 --- a/src/basicgetframe.h +++ b/src/basicgetframe.h @@ -19,7 +19,7 @@ private: * Deprecated field * @var uint16_t */ - uint16_t _deprecated; + uint16_t _deprecated = 0; /** * name of the queue to get a message from @@ -60,7 +60,6 @@ public: */ BasicGetFrame(uint16_t channel, const std::string& queue, bool noAck = false) : BasicFrame(channel, queue.length() + 4), // 1 for bool, 1 for string size, 2 for deprecated field - _deprecated(0), _queue(queue), _noAck(noAck) {} diff --git a/src/basicheaderframe.h b/src/basicheaderframe.h index 29059ed..ac0f644 100644 --- a/src/basicheaderframe.h +++ b/src/basicheaderframe.h @@ -19,7 +19,7 @@ private: * Weight field, unused but must be sent, always value 0; * @var uint16_t */ - uint16_t _weight; + uint16_t _weight = 0; /** * Body size, sum of the sizes of all body frames following the content header @@ -63,7 +63,6 @@ public: */ BasicHeaderFrame(uint16_t channel, const Envelope &envelope) : HeaderFrame(channel, 10 + envelope.size()), // there are at least 10 bytes sent, weight (2), bodySize (8), plus the size of the meta data - _weight(0), _bodySize(envelope.bodySize()), _metadata(envelope) {} diff --git a/src/basicpublishframe.h b/src/basicpublishframe.h index 7c241fe..9f9eb69 100644 --- a/src/basicpublishframe.h +++ b/src/basicpublishframe.h @@ -19,7 +19,7 @@ private: * Variable that no longer is in use * @var int16_t */ - int16_t _deprecated; + int16_t _deprecated = 0; /** * the name of the exchange to publish to. An empty exchange name means the default exchange. @@ -71,7 +71,6 @@ public: */ BasicPublishFrame(uint16_t channel, const std::string& exchange = "", const std::string& routingKey = "", bool mandatory = false, bool immediate = false) : BasicFrame(channel, exchange.length() + routingKey.length() + 5), // 1 extra per string (for the size), 1 for bools, 2 for deprecated field - _deprecated(0), _exchange(exchange), _routingKey(routingKey), _bools(mandatory, immediate) diff --git a/src/exchangebindframe.h b/src/exchangebindframe.h index 79baaec..e246fad 100644 --- a/src/exchangebindframe.h +++ b/src/exchangebindframe.h @@ -19,7 +19,7 @@ private: * reserved byte * @var uint16_t */ - uint16_t _reserved; + uint16_t _reserved = 0; /** * Exchange to bind to @@ -96,7 +96,6 @@ public: */ ExchangeBindFrame(uint16_t channel, const std::string &destination, const std::string &source, const std::string &routingKey, bool noWait, const Table &arguments) : ExchangeFrame(channel, (destination.length() + source.length() + routingKey.length() + arguments.size() + 6)), // 1 for each string, 1 for booleanset, 2 for deprecated field - _reserved(0), _destination(destination), _source(source), _routingKey(routingKey), diff --git a/src/exchangedeclareframe.h b/src/exchangedeclareframe.h index 7d6fc2e..9f36e64 100644 --- a/src/exchangedeclareframe.h +++ b/src/exchangedeclareframe.h @@ -19,7 +19,7 @@ private: * Field that no longer is used * @var uint16_t */ - uint16_t _deprecated; + uint16_t _deprecated = 0; /** * The exchange name @@ -82,7 +82,6 @@ public: */ ExchangeDeclareFrame(uint16_t channel, const std::string& name, const std::string& type, bool passive, bool durable, bool noWait, const Table& arguments) : ExchangeFrame(channel, (name.length() + type.length() + arguments.size() + 5)), // size of name, type and arguments + 1 (all booleans are stored in 1 byte) + 2 (deprecated short) + 2 (string sizes) - _deprecated(0), _name(name), _type(type), _bools(passive, durable, false, false, noWait), diff --git a/src/exchangedeleteframe.h b/src/exchangedeleteframe.h index 3077f41..960690c 100644 --- a/src/exchangedeleteframe.h +++ b/src/exchangedeleteframe.h @@ -19,7 +19,7 @@ private: * Field that is no longer in use * @var uint16_t */ - uint16_t _deprecated; + uint16_t _deprecated = 0; /** * The exchange name @@ -74,7 +74,6 @@ public: */ ExchangeDeleteFrame(uint16_t channel, const std::string& name, bool ifUnused = false, bool noWait = false) : ExchangeFrame(channel, name.length() + 4), // length of the name, 1 byte for encoding this length, 1 for bools, 2 for deprecated short - _deprecated(0), _name(name), _bools(ifUnused, noWait) {} diff --git a/src/exchangeunbindframe.h b/src/exchangeunbindframe.h index c474240..64999d2 100644 --- a/src/exchangeunbindframe.h +++ b/src/exchangeunbindframe.h @@ -19,7 +19,7 @@ private: * reserved byte * @var uint16_t */ - uint16_t _reserved; + uint16_t _reserved = 0; /** * Exchange to bind to @@ -96,7 +96,6 @@ public: */ ExchangeUnbindFrame(uint16_t channel, const std::string &destination, const std::string &source, const std::string &routingKey, bool noWait, const Table &arguments) : ExchangeFrame(channel, (destination.length() + source.length() + routingKey.length() + arguments.size() + 6)), // 1 for each string, 1 for booleanset, 2 for deprecated field - _reserved(0), _destination(destination), _source(source), _routingKey(routingKey), diff --git a/src/queuebindframe.h b/src/queuebindframe.h index 9a53897..93b30c6 100644 --- a/src/queuebindframe.h +++ b/src/queuebindframe.h @@ -19,7 +19,7 @@ private: * Deprecated field * @var uint16_t */ - uint16_t _deprecated; + uint16_t _deprecated = 0; /** * Queue name @@ -88,7 +88,6 @@ public: */ QueueBindFrame(uint16_t channel, const std::string& name, const std::string& exchange, const std::string& routingKey = "", bool noWait = false, const Table& arguments = {}) : QueueFrame(channel, (name.length() + exchange.length() + routingKey.length() + arguments.size() + 6) ), // 3 extra per string, 1 for bools, 2 for deprecated field - _deprecated(0), _name(name), _exchange(exchange), _routingKey(routingKey), diff --git a/src/queuedeclareframe.h b/src/queuedeclareframe.h index bc85f71..214cd48 100644 --- a/src/queuedeclareframe.h +++ b/src/queuedeclareframe.h @@ -19,7 +19,7 @@ private: * Field that no longer is in use * @var int16_t */ - int16_t _deprecated; + int16_t _deprecated = 0; /** * The exchange name @@ -81,7 +81,6 @@ public: */ QueueDeclareFrame(uint16_t channel, const std::string& name = "", bool passive = false, bool durable = false, bool exclusive = false, bool autoDelete = false, bool noWait = false, const Table& arguments = {}) : QueueFrame(channel, (name.length() + arguments.size() + 4 ) ), // 1 extra for string size, 1 for bools, 2 for deprecated value - _deprecated(0), _name(name), _bools(passive, durable, exclusive, autoDelete, noWait), _arguments(arguments) diff --git a/src/queuedeleteframe.h b/src/queuedeleteframe.h index 9f5a34e..8892c5e 100644 --- a/src/queuedeleteframe.h +++ b/src/queuedeleteframe.h @@ -19,7 +19,7 @@ private: * Field that is no longer in use * @var int16_t */ - int16_t _deprecated; + int16_t _deprecated = 0; /** * the queue name @@ -70,7 +70,6 @@ public: */ QueueDeleteFrame(uint16_t channel, const std::string& name, bool ifUnused = false, bool ifEmpty = false, bool noWait = false) : QueueFrame(channel, name.length() + 4), // 1 for string length, 1 for bools, 2 for deprecated field - _deprecated(0), _name(name), _bools(ifUnused, ifEmpty, noWait) {} diff --git a/src/queuepurgeframe.h b/src/queuepurgeframe.h index d9c92cf..e2a45b2 100644 --- a/src/queuepurgeframe.h +++ b/src/queuepurgeframe.h @@ -18,7 +18,7 @@ private: * Field that is no longer in use * @var int16_t */ - int16_t _deprecated; + int16_t _deprecated = 0; /** * Name of the queue @@ -66,7 +66,6 @@ public: */ QueuePurgeFrame(uint16_t channel, const std::string& name, bool noWait = false) : QueueFrame(channel, name.length() + 4), // 1 extra for string length, 1 for bool, 2 for deprecated field - _deprecated(0), _name(name), _noWait(noWait) {} diff --git a/src/queueunbindframe.h b/src/queueunbindframe.h index e969693..8460663 100644 --- a/src/queueunbindframe.h +++ b/src/queueunbindframe.h @@ -19,7 +19,7 @@ private: * Unused field * @var int16_t */ - int16_t _deprecated; + int16_t _deprecated = 0; /** * the queue name @@ -81,7 +81,6 @@ public: */ QueueUnbindFrame(uint16_t channel, const std::string& name, const std::string& exchange, const std::string& routingKey = "", const Table& arguments = {} ) : QueueFrame(channel, (name.length() + exchange.length() + routingKey.length() + arguments.size() + 5) ), // 1 per string, 2 for deprecated field - _deprecated(0), _name(name), _exchange(exchange), _routingKey(routingKey),