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 2016/06/02 14:03:30 UTC

qpid-proton git commit: NO-JIRA: c++: Fix coverity "ostream format" issue in examples.

Repository: qpid-proton
Updated Branches:
  refs/heads/master 934b40e35 -> ece7f4e48


NO-JIRA: c++: Fix coverity "ostream format" issue in examples.

Removed use of std::boolalpha. Apart from the coverity warning about not resetting
ostream format, it was not necessary and distracted from the purpose of the example.


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

Branch: refs/heads/master
Commit: ece7f4e487d1ed98793f6b87325639a61d484c6c
Parents: 934b40e
Author: Alan Conway <ac...@redhat.com>
Authored: Thu Jun 2 09:59:54 2016 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Thu Jun 2 09:59:54 2016 -0400

----------------------------------------------------------------------
 examples/cpp/encode_decode.cpp | 3 +--
 examples/cpp/example_test.py   | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ece7f4e4/examples/cpp/encode_decode.cpp
----------------------------------------------------------------------
diff --git a/examples/cpp/encode_decode.cpp b/examples/cpp/encode_decode.cpp
index 17971d9..862d1dd 100644
--- a/examples/cpp/encode_decode.cpp
+++ b/examples/cpp/encode_decode.cpp
@@ -145,7 +145,7 @@ static void insert_stream_operators() {
       << proton::codec::finish();
     print(v);
 
-    // Create a mixed-type list of the values [42, false, "x"].
+    // Create a mixed-type list of the values [42, 0, "x"].
     proton::codec::encoder e2(v);
     e2 << proton::codec::start::list()
        << int32_t(42) << false << proton::symbol("x")
@@ -243,7 +243,6 @@ static void print_next(proton::codec::decoder& d) {
 void print(proton::value& v) {
     proton::codec::decoder d(v);
     d.rewind();
-    std::cout << std::boolalpha; // Print boolean as true/false.
     while (d.more()) {
         print_next(d);
         if (d.more()) std::cout << ", ";

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ece7f4e4/examples/cpp/example_test.py
----------------------------------------------------------------------
diff --git a/examples/cpp/example_test.py b/examples/cpp/example_test.py
index 8592367..71cc09a 100644
--- a/examples/cpp/example_test.py
+++ b/examples/cpp/example_test.py
@@ -288,8 +288,8 @@ map{int(4):string(four), string(five):int(5)}
 
 == Insert with stream operators.
 array<int>[int(1), int(2), int(3)]
-list[int(42), boolean(false), symbol(x)]
-map{string(k1):int(42), symbol(k2):boolean(false)}
+list[int(42), boolean(0), symbol(x)]
+map{string(k1):int(42), symbol(k2):boolean(0)}
 """
         self.maxDiff = None
         self.assertEqual(want, self.proc(["encode_decode"]).wait_exit())


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