diff options
author | Josh Blum | 2011-07-20 12:20:40 -0700 |
---|---|---|
committer | Josh Blum | 2011-07-20 12:20:40 -0700 |
commit | 2ed243a36f9f19d10a552a350f856726e8e64b30 (patch) | |
tree | 9264a2c8ee0398684432f8b2fefcd0b3f77f422a /gruel/src/lib | |
parent | 1c25b884b67449de3f8ff6d4c2a2e8c83ae1f74f (diff) | |
download | gnuradio-2ed243a36f9f19d10a552a350f856726e8e64b30.tar.gz gnuradio-2ed243a36f9f19d10a552a350f856726e8e64b30.tar.bz2 gnuradio-2ed243a36f9f19d10a552a350f856726e8e64b30.zip |
gr: replaced uses of snprintf with boost format in common code build by MSVC
Diffstat (limited to 'gruel/src/lib')
-rw-r--r-- | gruel/src/lib/pmt/qa_pmt_prims.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gruel/src/lib/pmt/qa_pmt_prims.cc b/gruel/src/lib/pmt/qa_pmt_prims.cc index 985361f13..7dec30d56 100644 --- a/gruel/src/lib/pmt/qa_pmt_prims.cc +++ b/gruel/src/lib/pmt/qa_pmt_prims.cc @@ -23,6 +23,7 @@ #include <qa_pmt_prims.h> #include <cppunit/TestAssert.h> #include <gruel/msg_passing.h> +#include <boost/format.hpp> #include <cstdio> #include <cstring> #include <sstream> @@ -54,9 +55,8 @@ qa_pmt_prims::test_symbols() // generate a bunch of symbols for (int i = 0; i < N; i++){ - char buf[100]; - snprintf(buf, sizeof(buf), "test-%d", i); - v1[i] = mp(buf); + std::string buf = str(boost::format("test-%d") % i); + v1[i] = mp(buf.c_str()); } // confirm that they are all unique @@ -66,9 +66,8 @@ qa_pmt_prims::test_symbols() // generate the same symbols again for (int i = 0; i < N; i++){ - char buf[100]; - snprintf(buf, sizeof(buf), "test-%d", i); - v2[i] = mp(buf); + std::string buf = str(boost::format("test-%d") % i); + v2[i] = mp(buf.c_str()); } // confirm that we get the same ones back |