Merge pull request #218 from RZRCDR/fix_msvc_compiler_warnings

Fix msvc compiler warnings
This commit is contained in:
Emiel Bruijntjes 2018-10-27 12:52:07 +02:00 committed by GitHub
commit 11af8a7f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions

View File

@ -45,7 +45,8 @@ using DeleteCallback = std::function<void(uint32_t deletedmessages)>;
* When retrieving the size of a queue in some way * When retrieving the size of a queue in some way
*/ */
using EmptyCallback = std::function<void()>; using EmptyCallback = std::function<void()>;
using SizeCallback = std::function<void(uint32_t messagecount)>; using CountCallback = std::function<void(uint32_t messagecount)>;
using SizeCallback = std::function<void(uint64_t messagesize)>;
/** /**
* Starting and stopping a consumer * Starting and stopping a consumer

View File

@ -38,9 +38,9 @@ private:
/** /**
* Callback with the number of messages still in the queue * Callback with the number of messages still in the queue
* @var SizeCallback * @var CountCallback
*/ */
SizeCallback _countCallback; CountCallback _countCallback;
/** /**
* Report success for a get operation * Report success for a get operation
@ -162,7 +162,7 @@ public:
* Register a function to be called when queue size information is known * Register a function to be called when queue size information is known
* @param callback the callback to execute * @param callback the callback to execute
*/ */
DeferredGet &onCount(const SizeCallback &callback) DeferredGet &onCount(const CountCallback &callback)
{ {
// store callback // store callback
_countCallback = callback; _countCallback = callback;

View File

@ -283,11 +283,11 @@ Deferred &ChannelImpl::declareExchange(const std::string &name, ExchangeType typ
else if (type == ExchangeType::consistent_hash) exchangeType = "x-consistent-hash"; else if (type == ExchangeType::consistent_hash) exchangeType = "x-consistent-hash";
// the boolean options // the boolean options
bool passive = flags & AMQP::passive; bool passive = (flags & AMQP::passive) != 0;
bool durable = flags & AMQP::durable; bool durable = (flags & AMQP::durable) != 0;
bool autodelete = flags & AMQP::autodelete; bool autodelete = (flags & AMQP::autodelete) != 0;
bool internal = flags & AMQP::internal; bool internal = (flags & AMQP::internal) != 0;
bool nowait = flags & AMQP::nowait; bool nowait = (flags & AMQP::nowait) != 0;
// send declare exchange frame // send declare exchange frame
return push(ExchangeDeclareFrame(_id, name, exchangeType, passive, durable, autodelete, internal, nowait, arguments)); return push(ExchangeDeclareFrame(_id, name, exchangeType, passive, durable, autodelete, internal, nowait, arguments));