summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-20 18:06:14 -0700
committerJosh Blum <josh@joshknows.com>2011-07-20 18:06:14 -0700
commited34b5a0c7daea43bfac330350bc0c7334b36c77 (patch)
tree01d01206e696babecad0bbbcc8387be9aade1b43
parentd0a611585d3a44d1a432f3e5692feeb984ad0123 (diff)
gr: replaced uses of snprintf with boost format in common code build by MSVC
-rw-r--r--gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc b/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
index 7f1b40641e..ae04e4a658 100644
--- a/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
+++ b/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc
@@ -29,6 +29,7 @@
#include <gr_block_detail.h>
#include <gr_buffer.h>
#include <boost/thread.hpp>
+#include <boost/format.hpp>
#include <iostream>
#include <limits>
#include <assert.h>
@@ -57,9 +58,8 @@ gr_single_threaded_scheduler::gr_single_threaded_scheduler (
: d_blocks (blocks), d_enabled (true), d_log(0)
{
if (ENABLE_LOGGING){
- char name[100];
- snprintf(name, sizeof(name), "sst-%d.log", which_scheduler++);
- d_log = new std::ofstream(name);
+ std::string name = str(boost::format("sst-%d.log") % which_scheduler++);
+ d_log = new std::ofstream(name.c_str());
*d_log << "gr_single_threaded_scheduler: "
<< d_blocks.size ()
<< " blocks\n";