diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/messaging/Address.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/messaging/MapContent.cpp | 1 | ||||
-rw-r--r-- | cpp/src/qpid/messaging/Variant.cpp | 8 |
3 files changed, 8 insertions, 3 deletions
diff --git a/cpp/src/qpid/messaging/Address.cpp b/cpp/src/qpid/messaging/Address.cpp index fff7c453b8..5262cec0db 100644 --- a/cpp/src/qpid/messaging/Address.cpp +++ b/cpp/src/qpid/messaging/Address.cpp @@ -95,7 +95,7 @@ std::string Address::toStr() const std::stringstream out; out << impl->name; if (!impl->subject.empty()) out << SUBJECT_DIVIDER << impl->subject; - if (!impl->options.empty()) out << OPTIONS_DIVIDER << " {" << impl->options << "}"; + if (!impl->options.empty()) out << OPTIONS_DIVIDER << impl->options; return out.str(); } Address::operator bool() const { return !impl->name.empty(); } diff --git a/cpp/src/qpid/messaging/MapContent.cpp b/cpp/src/qpid/messaging/MapContent.cpp index c653561fc9..6dba22be99 100644 --- a/cpp/src/qpid/messaging/MapContent.cpp +++ b/cpp/src/qpid/messaging/MapContent.cpp @@ -41,6 +41,7 @@ class MapContentImpl : public Variant { qpid::client::amqp0_10::MapCodec codec; codec.encode(*this, msg->getContent()); + msg->setContentType(qpid::client::amqp0_10::MapCodec::contentType); } }; diff --git a/cpp/src/qpid/messaging/Variant.cpp b/cpp/src/qpid/messaging/Variant.cpp index 3b0c3312ca..71f9fbe646 100644 --- a/cpp/src/qpid/messaging/Variant.cpp +++ b/cpp/src/qpid/messaging/Variant.cpp @@ -566,19 +566,23 @@ Variant::operator const char*() const { return asString().c_str(); } std::ostream& operator<<(std::ostream& out, const Variant::Map& map) { + out << "{"; for (Variant::Map::const_iterator i = map.begin(); i != map.end(); ++i) { if (i != map.begin()) out << ", "; out << i->first << ":" << i->second; } + out << "}"; return out; } std::ostream& operator<<(std::ostream& out, const Variant::List& list) { + out << "["; for (Variant::List::const_iterator i = list.begin(); i != list.end(); ++i) { if (i != list.begin()) out << ", "; out << *i; } + out << "]"; return out; } @@ -586,10 +590,10 @@ std::ostream& operator<<(std::ostream& out, const Variant& value) { switch (value.getType()) { case VAR_MAP: - out << "{" << value.asMap() << "}"; + out << value.asMap(); break; case VAR_LIST: - out << "[" << value.asList() << "]"; + out << value.asList(); break; case VAR_VOID: out << "<void>"; |