qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [04/50] [abbrv] qpid-proton git commit: NO-JIRA: cpp binding: Fix printing of UUID using operator<<()
Date Wed, 30 Dec 2015 21:12:52 GMT
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 <kpvdr@apache.org>
Authored: Mon Nov 30 14:31:51 2015 -0500
Committer: Kim van der Riet <kpvdr@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


Mime
View raw message