diff options
| author | Charles E. Rolke <chug@apache.org> | 2011-09-30 20:58:23 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2011-09-30 20:58:23 +0000 |
| commit | cb05bb8ecd4e374c5a81742fa553614b192f1783 (patch) | |
| tree | df3c9eb7f50ff1a88951d91e8a5360da766cd71c /qpid/cpp/include | |
| parent | 6dbe2c32a525de61cc2681b2f2d67f7a8d95e4a8 (diff) | |
| download | qpid-python-cb05bb8ecd4e374c5a81742fa553614b192f1783.tar.gz | |
QPID-2574 Mismatch uint32_t / size_t
There is no logic error in this code.
The explicit type conversions silence conversion warnings.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1177835 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/include')
| -rw-r--r-- | qpid/cpp/include/qpid/console/ObjectId.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qpid/cpp/include/qpid/console/ObjectId.h b/qpid/cpp/include/qpid/console/ObjectId.h index 7904c85598..0722eaebeb 100644 --- a/qpid/cpp/include/qpid/console/ObjectId.h +++ b/qpid/cpp/include/qpid/console/ObjectId.h @@ -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); |
