Revision: 8457
http://playerstage.svn.sourceforge.net/playerstage/?rev=8457&view=rev
Author: rtv
Date: 2009-12-14 23:06:00 +0000 (Mon, 14 Dec 2009)
Log Message:
-----------
add boost check
Modified Paths:
--------------
code/websim/CMakeLists.txt
code/websim/src/req_sim.cc
code/websim/src/websim.cc
Modified: code/websim/CMakeLists.txt
===================================================================
--- code/websim/CMakeLists.txt 2009-12-14 17:20:51 UTC (rev 8456)
+++ code/websim/CMakeLists.txt 2009-12-14 23:06:00 UTC (rev 8457)
@@ -35,8 +35,11 @@
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
-# TODO: test for libevent and boost
+# find_package(Boost COMPONENTS system filesystem REQUIRED)
+find_package(Boost REQUIRED)
+# TODO: test for libevent
+
include(FindPkgConfig)
pkg_search_module( GLIB REQUIRED glib-2.0 )
Modified: code/websim/src/req_sim.cc
===================================================================
--- code/websim/src/req_sim.cc 2009-12-14 17:20:51 UTC (rev 8456)
+++ code/websim/src/req_sim.cc 2009-12-14 23:06:00 UTC (rev 8457)
@@ -290,7 +290,7 @@
sensors.push_back(m);
}
- char* names[] = { "laser", "ranger", "fiducial" };
+ const char* names[] = { "laser", "ranger", "fiducial" };
unsigned int index = 0;
for(unsigned int i=0;i<sensors.size();i++)
Modified: code/websim/src/websim.cc
===================================================================
--- code/websim/src/websim.cc 2009-12-14 17:20:51 UTC (rev 8456)
+++ code/websim/src/websim.cc 2009-12-14 23:06:00 UTC (rev 8457)
@@ -26,7 +26,6 @@
*/
-#include <boost/lexical_cast.hpp>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
@@ -44,9 +43,10 @@
std::string Time::String()
{
- std::string seconds = boost::lexical_cast<std::string>(sec);
- std::string microseconds = boost::lexical_cast<std::string>(usec);
- return( seconds + '.' + microseconds );
+ // faster than using boost::lexical_cast<float>
+ char buf[128];
+ snprintf( buf, 128, "%lu.%lu", sec, usec );
+ return std::string( buf );
}
WebSim::WebSim( const std::string& _host,
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit