You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cl...@apache.org on 2016/05/14 01:18:24 UTC

qpid-proton git commit: PROTON-1133: windows fix for older compilers

Repository: qpid-proton
Updated Branches:
  refs/heads/master 02fee21c5 -> 8f27d0e73


PROTON-1133: windows fix for older compilers


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

Branch: refs/heads/master
Commit: 8f27d0e735039e934a4fb4cc595f5b54ee794fc7
Parents: 02fee21
Author: Clifford Jansen <cl...@apache.org>
Authored: Fri May 13 18:17:55 2016 -0700
Committer: Clifford Jansen <cl...@apache.org>
Committed: Fri May 13 18:17:55 2016 -0700

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/container_test.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/8f27d0e7/proton-c/bindings/cpp/src/container_test.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/container_test.cpp b/proton-c/bindings/cpp/src/container_test.cpp
index 54086d7..53ea172 100644
--- a/proton-c/bindings/cpp/src/container_test.cpp
+++ b/proton-c/bindings/cpp/src/container_test.cpp
@@ -29,6 +29,7 @@
 #include <ctime>
 #include <string>
 #include <cstdio>
+#include <sstream>
 
 #if __cplusplus < 201103L
 #define override
@@ -37,10 +38,9 @@
 using namespace test;
 
 static std::string int2string(int n) {
-    char buf[64];
-
-    snprintf(buf, sizeof(buf), "%d", n);
-    return std::string(buf);
+    std::ostringstream strm;
+    strm << n;
+    return strm.str();
 }
 
 class test_handler : public proton::handler {


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