You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/12/30 22:12:52 UTC

[04/50] [abbrv] qpid-proton git commit: NO-JIRA: cpp binding: Fix printing of UUID using operator<<()

NO-JIRA: cpp binding: Fix printing of UUID using operator<<()


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/fdbba697
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/fdbba697
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/fdbba697

Branch: refs/heads/go1
Commit: fdbba6973e2615824328f2e2a094337b4a4153bf
Parents: cf784e2
Author: Kim van der Riet <kp...@apache.org>
Authored: Mon Nov 30 14:31:51 2015 -0500
Committer: Kim van der Riet <kp...@apache.org>
Committed: Mon Nov 30 14:31:51 2015 -0500

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/types.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/fdbba697/proton-c/bindings/cpp/src/types.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/types.cpp b/proton-c/bindings/cpp/src/types.cpp
index 0964699..4b1d21d 100644
--- a/proton-c/bindings/cpp/src/types.cpp
+++ b/proton-c/bindings/cpp/src/types.cpp
@@ -20,13 +20,14 @@
 #include "proton/types.hpp"
 #include <proton/codec.h>
 #include <ostream>
+#include <iomanip>
 #include <algorithm>
 
 namespace proton {
 
 namespace {
 inline std::ostream& print_segment(std::ostream& o, const amqp_uuid& u, size_t begin, size_t end, const char* sep="") {
-    for (const char* p = &u[begin]; p < &u[end]; ++p) o << *p;
+    for (const char* p = &u[begin]; p < &u[end]; ++p) o << std::setw(2) << std::setfill('0') << ((int)*p & 0xff);
     return o << sep;
 }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org