diff --git a/include/amqpcpp/callbacks.h b/include/amqpcpp/callbacks.h index 76ac090..7b52653 100644 --- a/include/amqpcpp/callbacks.h +++ b/include/amqpcpp/callbacks.h @@ -45,7 +45,8 @@ using DeleteCallback = std::function; * When retrieving the size of a queue in some way */ using EmptyCallback = std::function; -using SizeCallback = std::function; +using CountCallback = std::function; +using SizeCallback = std::function; /** * Starting and stopping a consumer diff --git a/include/amqpcpp/deferredget.h b/include/amqpcpp/deferredget.h index dba731a..f8248a9 100644 --- a/include/amqpcpp/deferredget.h +++ b/include/amqpcpp/deferredget.h @@ -38,9 +38,9 @@ private: /** * Callback with the number of messages still in the queue - * @var SizeCallback + * @var CountCallback */ - SizeCallback _countCallback; + CountCallback _countCallback; /** * Report success for a get operation @@ -162,7 +162,7 @@ public: * Register a function to be called when queue size information is known * @param callback the callback to execute */ - DeferredGet &onCount(const SizeCallback &callback) + DeferredGet &onCount(const CountCallback &callback) { // store callback _countCallback = callback; diff --git a/src/channelimpl.cpp b/src/channelimpl.cpp index c024bc7..75fbe44 100644 --- a/src/channelimpl.cpp +++ b/src/channelimpl.cpp @@ -283,11 +283,11 @@ Deferred &ChannelImpl::declareExchange(const std::string &name, ExchangeType typ else if (type == ExchangeType::consistent_hash) exchangeType = "x-consistent-hash"; // the boolean options - bool passive = flags & AMQP::passive; - bool durable = flags & AMQP::durable; - bool autodelete = flags & AMQP::autodelete; - bool internal = flags & AMQP::internal; - bool nowait = flags & AMQP::nowait; + bool passive = (flags & AMQP::passive) != 0; + bool durable = (flags & AMQP::durable) != 0; + bool autodelete = (flags & AMQP::autodelete) != 0; + bool internal = (flags & AMQP::internal) != 0; + bool nowait = (flags & AMQP::nowait) != 0; // send declare exchange frame return push(ExchangeDeclareFrame(_id, name, exchangeType, passive, durable, autodelete, internal, nowait, arguments));