You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2011/09/30 22:58:23 UTC
svn commit: r1177835 - /qpid/trunk/qpid/cpp/include/qpid/console/ObjectId.h
Author: chug
Date: Fri Sep 30 20:58:23 2011
New Revision: 1177835
URL: http://svn.apache.org/viewvc?rev=1177835&view=rev
Log:
QPID-2574 Mismatch uint32_t / size_t
There is no logic error in this code.
The explicit type conversions silence conversion warnings.
Modified:
qpid/trunk/qpid/cpp/include/qpid/console/ObjectId.h
Modified: qpid/trunk/qpid/cpp/include/qpid/console/ObjectId.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qpid/console/ObjectId.h?rev=1177835&r1=1177834&r2=1177835&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/include/qpid/console/ObjectId.h (original)
+++ qpid/trunk/qpid/cpp/include/qpid/console/ObjectId.h Fri Sep 30 20:58:23 2011
@@ -40,10 +40,10 @@ namespace console {
ObjectId() : first(0), second(0) {}
ObjectId(framing::Buffer& buffer);
- uint8_t getFlags() const { return (first & 0xF000000000000000LL) >> 60; }
- uint16_t getSequence() const { return (first & 0x0FFF000000000000LL) >> 48; }
- uint32_t getBrokerBank() const { return (first & 0x0000FFFFF0000000LL) >> 28; }
- uint32_t getAgentBank() const { return first & 0x000000000FFFFFFFLL; }
+ uint8_t getFlags() const { return (uint8_t)((first & 0xF000000000000000LL) >> 60); }
+ uint16_t getSequence() const { return (uint16_t)((first & 0x0FFF000000000000LL) >> 48); }
+ uint32_t getBrokerBank() const { return (uint32_t)((first & 0x0000FFFFF0000000LL) >> 28); }
+ uint32_t getAgentBank() const { return (uint32_t) (first & 0x000000000FFFFFFFLL); }
uint64_t getObject() const { return second; }
bool isDurable() const { return getSequence() == 0; }
void decode(framing::Buffer& buffer);
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org