[Fawkes Git] branch/thofmann/gcc6: created (0.5.0-3085-g0cf059f)

Tim Niemueller niemueller at kbsg.rwth-aachen.de
Tue Jul 12 09:52:22 CEST 2016


Changes have been pushed for the project "Fawkes Robotics Software Framework".

Gitweb: http://git.fawkesrobotics.org/fawkes.git
Trac:   http://trac.fawkesrobotics.org

The branch, thofmann/gcc6 has been created
        at  0cf059fd63b7a66991e86d196ea6264111a8e66f (commit)

http://git.fawkesrobotics.org/fawkes.git/thofmann/gcc6

- *Log* ---------------------------------------------------------------
commit 621dcb18353d5060b165695e9bc116d405f77174
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jul 7 18:05:01 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jul 7 18:05:01 2016 +0200

    gcc6: add spaces between literals and string macros
    
    GCC6 requires a space between a string literal and a string macro.

http://git.fawkesrobotics.org/fawkes.git/commit/621dcb1
http://trac.fawkesrobotics.org/changeset/621dcb1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 61684735eb531d5e8b0cfd637e2bdcc10e3242cb
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jul 7 18:27:16 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jul 7 18:27:16 2016 +0200

    gcc6: replace all auto_ptrs by unique_ptrs or shared_ptrs
    
    We assume that we use C++11, any case distinction for the C++ version
    and all auto_ptrs are removed.

http://git.fawkesrobotics.org/fawkes.git/commit/6168473
http://trac.fawkesrobotics.org/changeset/6168473

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit ddd162a5375f007c9d30fc9580b7056b2af561ed
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jul 7 18:34:41 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jul 7 18:34:41 2016 +0200

    laser: use fill_n instead of memset to avoid overflow in conversion
    
    Using memset on a float array may cause an overflow in the implicit
    conversion from float to int, which GCC6 complains about. Replace memset
    by the cleaner std::fill_n.

http://git.fawkesrobotics.org/fawkes.git/commit/ddd162a
http://trac.fawkesrobotics.org/changeset/ddd162a

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 0cf059fd63b7a66991e86d196ea6264111a8e66f
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jul 7 18:37:51 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jul 7 18:37:51 2016 +0200

    colli: isinf is in the namespace std and was removed from the global ns
    
    Recent versions of libcxx removed isinf from the global namespace. It's
    always been part of the namespace std, so always use std::isinf.

http://git.fawkesrobotics.org/fawkes.git/commit/0cf059f
http://trac.fawkesrobotics.org/changeset/0cf059f

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------
 src/libs/fvutils/ipc/shm_image.cpp                 |    4 ++--
 src/libs/fvwidgets/image_widget.cpp                |    2 +-
 src/libs/gui_utils/plugin_tree_view.cpp            |    8 ++++----
 src/plugins/bblogger/bblogreplay_plugin.cpp        |    2 +-
 src/plugins/clips/feature_config.cpp               |    2 +-
 src/plugins/colli/utils/rob/roboshape.cpp          |   18 +++++++++---------
 src/plugins/dynamixel/dynamixel_plugin.cpp         |    4 ----
 src/plugins/imu/imu_plugin.cpp                     |    2 +-
 src/plugins/laser-cluster/laser-cluster-plugin.cpp |    2 +-
 src/plugins/laser-filter/filter_thread.cpp         |    4 ++--
 src/plugins/laser-filter/laser_filter_plugin.cpp   |    6 +++---
 src/plugins/laser/acquisition_thread.cpp           |    5 ++---
 src/plugins/laser/laser_plugin.cpp                 |    2 +-
 src/plugins/laser/urg_aqt.cpp                      |    2 +-
 src/plugins/laser/urg_gbx_aqt.cpp                  |    4 ++--
 src/plugins/mongodb/mongodb_thread.cpp             |    6 +++---
 .../mongodb_log/tools/ffmongodb_save_imgs.cpp      |    4 ----
 src/plugins/openni/depth_thread.cpp                |    4 ++--
 src/plugins/openni/handtracker_thread.cpp          |   12 ++++++------
 src/plugins/openni/image_thread.cpp                |    4 ++--
 src/plugins/openni/pointcloud_thread.cpp           |    8 ++++----
 src/plugins/openprs/mod_config.cpp                 |    4 ----
 .../perception/pcl-db/mongodb_tf_transformer.cpp   |    2 +-
 src/plugins/perception/pcl-db/pcl_db_pipeline.h    |    4 ++--
 .../static_transforms/static_transforms_thread.cpp |    4 ----
 .../webview-ptzcam/webview-ptzcam-thread.cpp       |    4 ----
 src/tools/lasergui/lasergui.cpp                    |    4 ----
 src/tools/lasergui/lasergui_hildon.cpp             |    2 +-
 src/tools/plugin_gui/main.cpp                      |    2 +-
 src/tools/skillgui/skillgui.cpp                    |    2 +-
 src/tools/vision/firestation/main.cpp              |    2 +-
 src/tools/vision/fuse_viewer/main.cpp              |    2 +-
 32 files changed, 56 insertions(+), 81 deletions(-)


- *Diffs* -------------------------------------------------------------

- *commit* 621dcb18353d5060b165695e9bc116d405f77174 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jul 7 18:05:01 2016 +0200
Subject: gcc6: add spaces between literals and string macros

 src/libs/plugin/manager.cpp                     |    6 +++---
 src/libs/utils/system/dynamic_module/module.cpp |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

_Diff for modified files_:
diff --git a/src/libs/plugin/manager.cpp b/src/libs/plugin/manager.cpp
index b7d8e88..961f8ab 100644
--- a/src/libs/plugin/manager.cpp
+++ b/src/libs/plugin/manager.cpp
@@ -107,7 +107,7 @@ PluginManager::PluginManager(ThreadCollector *thread_collector,
   __fam_thread = new FamThread();
 #ifdef HAVE_INOTIFY
   RefPtr<FileAlterationMonitor> fam = __fam_thread->get_fam();
-  fam->add_filter("^[^.].*\\."SOEXT"$");
+  fam->add_filter("^[^.].*\\." SOEXT "$");
   fam->add_listener(this);
   fam->watch_dir(PLUGINDIR);
   __fam_thread->start();
@@ -167,7 +167,7 @@ PluginManager::init_pinfo_cache()
 
   DIR *plugin_dir;
   struct dirent* dirp;
-  const char *file_ext = "."SOEXT;
+  const char *file_ext = "." SOEXT;
 
   if ( NULL == (plugin_dir = opendir(PLUGINDIR)) ) {
     throw Exception(errno, "Plugin directory %s could not be opened", PLUGINDIR);
@@ -488,7 +488,7 @@ PluginManager::config_value_erased(const char *path)
 void
 PluginManager::fam_event(const char *filename, unsigned int mask)
 {
-  const char *file_ext = "."SOEXT;
+  const char *file_ext = "." SOEXT;
 
   const char *pos = strstr(filename, file_ext);
   std::string p = std::string(filename).substr(0, strlen(filename) - strlen(file_ext));
diff --git a/src/libs/utils/system/dynamic_module/module.cpp b/src/libs/utils/system/dynamic_module/module.cpp
index 4ac0fe8..4b03eab 100644
--- a/src/libs/utils/system/dynamic_module/module.cpp
+++ b/src/libs/utils/system/dynamic_module/module.cpp
@@ -94,9 +94,9 @@ Module::open()
   std::string full_filename = "";
   full_filename = __filename;
   //                                                                .   SOEXT
-  if ( full_filename.find("."SOEXT, 0) != (full_filename.length() - 1 - strlen(FILE_EXTENSION)) ) {
+  if ( full_filename.find("." SOEXT, 0) != (full_filename.length() - 1 - strlen(FILE_EXTENSION)) ) {
     // filename has no proper ending
-    full_filename += "."SOEXT;
+    full_filename += "." SOEXT;
   }
 
   int tflags = 0;

- *commit* 61684735eb531d5e8b0cfd637e2bdcc10e3242cb - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jul 7 18:27:16 2016 +0200
Subject: gcc6: replace all auto_ptrs by unique_ptrs or shared_ptrs

 src/libs/fvutils/ipc/shm_image.cpp                 |    4 ++--
 src/libs/fvwidgets/image_widget.cpp                |    2 +-
 src/libs/gui_utils/plugin_tree_view.cpp            |    8 ++++----
 src/plugins/bblogger/bblogreplay_plugin.cpp        |    2 +-
 src/plugins/clips/feature_config.cpp               |    2 +-
 src/plugins/dynamixel/dynamixel_plugin.cpp         |    4 ----
 src/plugins/imu/imu_plugin.cpp                     |    2 +-
 src/plugins/laser-cluster/laser-cluster-plugin.cpp |    2 +-
 src/plugins/laser-filter/filter_thread.cpp         |    4 ++--
 src/plugins/laser-filter/laser_filter_plugin.cpp   |    6 +++---
 src/plugins/laser/laser_plugin.cpp                 |    2 +-
 src/plugins/laser/urg_aqt.cpp                      |    2 +-
 src/plugins/laser/urg_gbx_aqt.cpp                  |    4 ++--
 src/plugins/mongodb/mongodb_thread.cpp             |    6 +++---
 .../mongodb_log/tools/ffmongodb_save_imgs.cpp      |    4 ----
 src/plugins/openni/depth_thread.cpp                |    4 ++--
 src/plugins/openni/handtracker_thread.cpp          |   12 ++++++------
 src/plugins/openni/image_thread.cpp                |    4 ++--
 src/plugins/openni/pointcloud_thread.cpp           |    8 ++++----
 src/plugins/openprs/mod_config.cpp                 |    4 ----
 .../perception/pcl-db/mongodb_tf_transformer.cpp   |    2 +-
 src/plugins/perception/pcl-db/pcl_db_pipeline.h    |    4 ++--
 .../static_transforms/static_transforms_thread.cpp |    4 ----
 .../webview-ptzcam/webview-ptzcam-thread.cpp       |    4 ----
 src/tools/lasergui/lasergui.cpp                    |    4 ----
 src/tools/lasergui/lasergui_hildon.cpp             |    2 +-
 src/tools/plugin_gui/main.cpp                      |    2 +-
 src/tools/skillgui/skillgui.cpp                    |    2 +-
 src/tools/vision/firestation/main.cpp              |    2 +-
 src/tools/vision/fuse_viewer/main.cpp              |    2 +-
 30 files changed, 45 insertions(+), 69 deletions(-)

_Diff for modified files_:
diff --git a/src/libs/fvutils/ipc/shm_image.cpp b/src/libs/fvutils/ipc/shm_image.cpp
index e6cd13e..b401e92 100644
--- a/src/libs/fvutils/ipc/shm_image.cpp
+++ b/src/libs/fvutils/ipc/shm_image.cpp
@@ -506,9 +506,9 @@ SharedMemoryImageBuffer::list()
 std::list<SharedMemoryImageBufferMetaData>
 SharedMemoryImageBuffer::list_meta_data()
 {
-  std::auto_ptr<SharedMemoryImageBufferMetaDataCollector>
+  std::unique_ptr<SharedMemoryImageBufferMetaDataCollector>
     lister(new SharedMemoryImageBufferMetaDataCollector());
-  std::auto_ptr<SharedMemoryImageBufferHeader>
+  std::unique_ptr<SharedMemoryImageBufferHeader>
     h(new SharedMemoryImageBufferHeader());
 
   SharedMemory::list(FIREVISION_SHM_IMAGE_MAGIC_TOKEN, h.get(), lister.get());
diff --git a/src/libs/fvwidgets/image_widget.cpp b/src/libs/fvwidgets/image_widget.cpp
index 670199a..eccf68c 100644
--- a/src/libs/fvwidgets/image_widget.cpp
+++ b/src/libs/fvwidgets/image_widget.cpp
@@ -436,7 +436,7 @@ ImageWidget::save_image(std::string filename, Glib::ustring type) const throw()
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
     __pixbuf->save(filename, type);
 #else
-    std::auto_ptr<Glib::Error> error;
+    std::unique_ptr<Glib::Error> error;
     __pixbuf->save(filename, type, error);
 #endif
     __cam_mutex->unlock();
diff --git a/src/libs/gui_utils/plugin_tree_view.cpp b/src/libs/gui_utils/plugin_tree_view.cpp
index 662e943..79dc204 100644
--- a/src/libs/gui_utils/plugin_tree_view.cpp
+++ b/src/libs/gui_utils/plugin_tree_view.cpp
@@ -125,7 +125,7 @@ PluginTreeView::~PluginTreeView()
 #  ifdef GLIBMM_EXCEPTIONS_ENABLED
     __gconf->remove_dir(__gconf_prefix);
 #  else
-    std::auto_ptr<Glib::Error> error;
+    std::unique_ptr<Glib::Error> error;
     __gconf->remove_dir(__gconf_prefix, error);
 #  endif
   }
@@ -156,7 +156,7 @@ PluginTreeView::set_gconf_prefix(Glib::ustring gconf_prefix)
 #  ifdef GLIBMM_EXCEPTIONS_ENABLED
     __gconf->remove_dir(__gconf_prefix);
 #  else
-    std::auto_ptr<Glib::Error> error;
+    std::unique_ptr<Glib::Error> error;
     __gconf->remove_dir(__gconf_prefix, error);
 #  endif
   }
@@ -164,7 +164,7 @@ PluginTreeView::set_gconf_prefix(Glib::ustring gconf_prefix)
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   __gconf->add_dir(gconf_prefix);
 #else
-  std::auto_ptr<Glib::Error> error;
+  std::unique_ptr<Glib::Error> error;
   __gconf->add_dir(gconf_prefix, Gnome::Conf::CLIENT_PRELOAD_NONE, error);
 #endif
   __gconf_prefix = gconf_prefix;
@@ -448,7 +448,7 @@ PluginTreeView::append_plugin_column()
 #    ifdef GLIBMM_EXCEPTIONS_ENABLED
     description_as_tooltip = __gconf->get_bool(__gconf_prefix + "/description_as_tooltip");
 #    else
-    std::auto_ptr<Glib::Error> error;
+    std::unique_ptr<Glib::Error> error;
     description_as_tooltip = __gconf->get_bool(__gconf_prefix + "/description_as_tooltip", error);
 #    endif
   }
diff --git a/src/plugins/bblogger/bblogreplay_plugin.cpp b/src/plugins/bblogger/bblogreplay_plugin.cpp
index b46b53c..0ce3a11 100644
--- a/src/plugins/bblogger/bblogreplay_plugin.cpp
+++ b/src/plugins/bblogger/bblogreplay_plugin.cpp
@@ -103,7 +103,7 @@ BlackBoardLogReplayPlugin::BlackBoardLogReplayPlugin(Configuration *config)
     scenario_grace_period = config->get_float((scenario_prefix + "grace_period").c_str());
   } catch (Exception &e) {} // ignored, assume enabled
 
-  std::auto_ptr<Configuration::ValueIterator> i(config->search(logs_prefix.c_str()));
+  std::unique_ptr<Configuration::ValueIterator> i(config->search(logs_prefix.c_str()));
   while (i->next()) {
     std::string log_name = std::string(i->path()).substr(logs_prefix.length());
     log_name = log_name.substr(0, log_name.find("/"));
diff --git a/src/plugins/clips/feature_config.cpp b/src/plugins/clips/feature_config.cpp
index e15631c..36827d7 100644
--- a/src/plugins/clips/feature_config.cpp
+++ b/src/plugins/clips/feature_config.cpp
@@ -86,7 +86,7 @@ ConfigCLIPSFeature::clips_config_load(std::string env_name, std::string cfg_pref
   }
 
   fawkes::MutexLocker lock(envs_[env_name].objmutex_ptr());
-  std::auto_ptr<Configuration::ValueIterator> v(config_->search(cfg_prefix.c_str()));
+  std::unique_ptr<Configuration::ValueIterator> v(config_->search(cfg_prefix.c_str()));
   while (v->next()) {
     std::string type = "";
     std::string value = v->get_as_string();
diff --git a/src/plugins/dynamixel/dynamixel_plugin.cpp b/src/plugins/dynamixel/dynamixel_plugin.cpp
index 4493eeb..505ca5b 100644
--- a/src/plugins/dynamixel/dynamixel_plugin.cpp
+++ b/src/plugins/dynamixel/dynamixel_plugin.cpp
@@ -51,11 +51,7 @@ class DynamixelPlugin : public fawkes::Plugin
     std::string prefix = "/dynamixel/";
 
     // Read configurations and spawn LaserFilterThreads
-#if __cplusplus >= 201103L
     std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
-#else
-    std::auto_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
-#endif
     while (i->next()) {
       std::string cfg_name = std::string(i->path()).substr(prefix.length());
       cfg_name = cfg_name.substr(0, cfg_name.find("/"));
diff --git a/src/plugins/imu/imu_plugin.cpp b/src/plugins/imu/imu_plugin.cpp
index 20f6272..88e5f40 100644
--- a/src/plugins/imu/imu_plugin.cpp
+++ b/src/plugins/imu/imu_plugin.cpp
@@ -52,7 +52,7 @@ class IMUPlugin : public fawkes::Plugin
 #if __cplusplus >= 201103L
     std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
 #else
-    std::auto_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
+    std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
 #endif
     while (i->next()) {
       std::string cfg_name = std::string(i->path()).substr(prefix.length());
diff --git a/src/plugins/laser-cluster/laser-cluster-plugin.cpp b/src/plugins/laser-cluster/laser-cluster-plugin.cpp
index 0ec9097..b49dcae 100644
--- a/src/plugins/laser-cluster/laser-cluster-plugin.cpp
+++ b/src/plugins/laser-cluster/laser-cluster-plugin.cpp
@@ -45,7 +45,7 @@ class LaserClusterPlugin : public fawkes::Plugin
     std::string prefix = "/laser-cluster/";
 
     // Read configurations and spawn LaserFilterThreads
-    std::auto_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
+    std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
     while (i->next()) {
       std::string cfg_name = std::string(i->path()).substr(prefix.length());
       cfg_name = cfg_name.substr(0, cfg_name.find("/"));
diff --git a/src/plugins/laser-filter/filter_thread.cpp b/src/plugins/laser-filter/filter_thread.cpp
index 3a42e21..0a4e455 100644
--- a/src/plugins/laser-filter/filter_thread.cpp
+++ b/src/plugins/laser-filter/filter_thread.cpp
@@ -93,7 +93,7 @@ LaserFilterThread::init()
     std::map<std::string, std::string> filters;
 
     std::string fpfx = __cfg_prefix + "filters/";
-    std::auto_ptr<Configuration::ValueIterator> i(config->search(fpfx.c_str()));
+    std::unique_ptr<Configuration::ValueIterator> i(config->search(fpfx.c_str()));
     while (i->next()) {
       
       std::string suffix = std::string(i->path()).substr(fpfx.length());
@@ -272,7 +272,7 @@ LaserFilterThread::open_interfaces(std::string prefix,
 				   std::vector<LaserInterface> &ifs,
 				   std::vector<LaserDataFilter::Buffer *> &bufs, bool writing)
 {
-  std::auto_ptr<Configuration::ValueIterator> in(config->search(prefix.c_str()));
+  std::unique_ptr<Configuration::ValueIterator> in(config->search(prefix.c_str()));
   while (in->next()) {
     if (! in->is_string()) {
       throw Exception("Config value %s is not of type string", in->path());
diff --git a/src/plugins/laser-filter/laser_filter_plugin.cpp b/src/plugins/laser-filter/laser_filter_plugin.cpp
index dceaf7b..12b9dd6 100644
--- a/src/plugins/laser-filter/laser_filter_plugin.cpp
+++ b/src/plugins/laser-filter/laser_filter_plugin.cpp
@@ -54,7 +54,7 @@ LaserFilterPlugin::LaserFilterPlugin(Configuration *config)
   std::string prefix = "/plugins/laser-filter/";
 
   // Read configurations and spawn LaserFilterThreads
-  std::auto_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
+  std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
   while (i->next()) {
     std::string cfg_name = std::string(i->path()).substr(prefix.length());
     cfg_name = cfg_name.substr(0, cfg_name.find("/"));
@@ -102,7 +102,7 @@ LaserFilterPlugin::LaserFilterPlugin(Configuration *config)
   for (c = configs.begin(); c != configs.end(); ++c) {
     std::string cinp = prefix + *c + "/in/";
     std::list<std::string> cinputs;
-    std::auto_ptr<Configuration::ValueIterator> in(config->search(cinp.c_str()));
+    std::unique_ptr<Configuration::ValueIterator> in(config->search(cinp.c_str()));
     while (in->next()) {
       if (in->is_string()) {
 	cinputs.push_back(in->get_string());
@@ -111,7 +111,7 @@ LaserFilterPlugin::LaserFilterPlugin(Configuration *config)
 
     std::string coutp = prefix + *c + "/out/";
     std::list<std::string> coutputs;
-    std::auto_ptr<Configuration::ValueIterator> out(config->search(coutp.c_str()));
+    std::unique_ptr<Configuration::ValueIterator> out(config->search(coutp.c_str()));
     while (out->next()) {
       if (out->is_string()) {
 	coutputs.push_back(out->get_string());
diff --git a/src/plugins/laser/laser_plugin.cpp b/src/plugins/laser/laser_plugin.cpp
index 94f161b..f5f7c31 100644
--- a/src/plugins/laser/laser_plugin.cpp
+++ b/src/plugins/laser/laser_plugin.cpp
@@ -62,7 +62,7 @@ LaserPlugin::LaserPlugin(Configuration *config)
 
   std::string prefix = "/hardware/laser/";
 
-  std::auto_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
+  std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
   while (i->next()) {
     std::string cfg_name = std::string(i->path()).substr(prefix.length());
     cfg_name = cfg_name.substr(0, cfg_name.find("/"));
diff --git a/src/plugins/laser/urg_aqt.cpp b/src/plugins/laser/urg_aqt.cpp
index ec77396..9fcb9a8 100644
--- a/src/plugins/laser/urg_aqt.cpp
+++ b/src/plugins/laser/urg_aqt.cpp
@@ -205,7 +205,7 @@ HokuyoUrgAcquisitionThread::init()
 #endif
 
   __ctrl = new UrgCtrl();
-  std::auto_ptr<UrgCtrl> ctrl(__ctrl);
+  std::unique_ptr<UrgCtrl> ctrl(__ctrl);
   __fd = open(__cfg_device.c_str(), 0, O_RDONLY);
   if (__fd == -1) {
     throw Exception(errno, "Failed to open URG device %s", __cfg_device.c_str());
diff --git a/src/plugins/laser/urg_gbx_aqt.cpp b/src/plugins/laser/urg_gbx_aqt.cpp
index 5182336..b3de7ae 100644
--- a/src/plugins/laser/urg_gbx_aqt.cpp
+++ b/src/plugins/laser/urg_gbx_aqt.cpp
@@ -88,10 +88,10 @@ HokuyoUrgGbxAcquisitionThread::init()
 
 #ifdef HAVE_URG_GBX_9_11
   __laser = new HokuyoLaser();
-  std::auto_ptr<HokuyoLaser> laser(__laser);
+  std::unique_ptr<HokuyoLaser> laser(__laser);
 #else
   __laser = new Sensor();
-  std::auto_ptr<Sensor> laser(__laser);
+  std::unique_ptr<Sensor> laser(__laser);
 #endif
   std::string port_options = "type=serial,device=" + __cfg_device + ",timeout=1";
   try {
diff --git a/src/plugins/mongodb/mongodb_thread.cpp b/src/plugins/mongodb/mongodb_thread.cpp
index 081fd18..b38f493 100644
--- a/src/plugins/mongodb/mongodb_thread.cpp
+++ b/src/plugins/mongodb/mongodb_thread.cpp
@@ -113,7 +113,7 @@ MongoDBThread::init()
 #if __cplusplus >= 201103L || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 4)
   std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
 #else
-  std::auto_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
+  std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
 #endif
   while (i->next()) {
     std::string cfg_name = std::string(i->path()).substr(prefix.length());
@@ -217,7 +217,7 @@ MongoDBThread::ClientConf::read_authinfo(Configuration *config, Logger *logger,
 #if __cplusplus >= 201103L
   std::unique_ptr<Configuration::ValueIterator>
 #else
-  std::auto_ptr<Configuration::ValueIterator>
+  std::unique_ptr<Configuration::ValueIterator>
 #endif
     i(config->search((prefix + "auth/").c_str()));
   while (i->next()) {
@@ -271,7 +271,7 @@ MongoDBThread::ClientConf::ClientConf(Configuration *config, Logger *logger,
 #if __cplusplus >= 201103L || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 4)
     std::unique_ptr<Configuration::ValueIterator>
 #else
-    std::auto_ptr<Configuration::ValueIterator>
+    std::unique_ptr<Configuration::ValueIterator>
 #endif
       i(config->search((prefix + "hosts/").c_str()));
     while (i->next()) {
diff --git a/src/plugins/mongodb_log/tools/ffmongodb_save_imgs.cpp b/src/plugins/mongodb_log/tools/ffmongodb_save_imgs.cpp
index 71def66..11dd3b2 100644
--- a/src/plugins/mongodb_log/tools/ffmongodb_save_imgs.cpp
+++ b/src/plugins/mongodb_log/tools/ffmongodb_save_imgs.cpp
@@ -136,11 +136,7 @@ main(int argc, char **argv)
 	.sort("timestamp", 1);
     }
 
-#if __cplusplus >= 201103L
     std::unique_ptr<mongo::DBClientCursor> cursor =
-#else
-    std::auto_ptr<mongo::DBClientCursor> cursor =
-#endif
       mongodb_client->query(query_coll, q);
 
     while (cursor->more()) {
diff --git a/src/plugins/openni/depth_thread.cpp b/src/plugins/openni/depth_thread.cpp
index 1dfc8ae..0e70b01 100644
--- a/src/plugins/openni/depth_thread.cpp
+++ b/src/plugins/openni/depth_thread.cpp
@@ -60,7 +60,7 @@ OpenNiDepthThread::init()
   MutexLocker lock(openni.objmutex_ptr());
 
   __depth_gen = new xn::DepthGenerator();
-  std::auto_ptr<xn::DepthGenerator> depthgen_autoptr(__depth_gen);
+  std::unique_ptr<xn::DepthGenerator> depthgen_uniqueptr(__depth_gen);
 
   XnStatus st;
 
@@ -90,7 +90,7 @@ OpenNiDepthThread::init()
   *__capture_start -= (long int)__depth_gen->GetTimestamp();
   
   
-  depthgen_autoptr.release();
+  depthgen_uniqueptr.release();
 }
 
 
diff --git a/src/plugins/openni/handtracker_thread.cpp b/src/plugins/openni/handtracker_thread.cpp
index 14545ce..73e375a 100644
--- a/src/plugins/openni/handtracker_thread.cpp
+++ b/src/plugins/openni/handtracker_thread.cpp
@@ -103,13 +103,13 @@ OpenNiHandTrackerThread::init()
   MutexLocker lock(openni.objmutex_ptr());
 
   __hand_gen = new xn::HandsGenerator();
-  std::auto_ptr<xn::HandsGenerator> handgen_autoptr(__hand_gen);
+  std::unique_ptr<xn::HandsGenerator> handgen_uniqueptr(__hand_gen);
 
   __gesture_gen = new xn::GestureGenerator();
-  std::auto_ptr<xn::GestureGenerator> gesturegen_autoptr(__gesture_gen);
+  std::unique_ptr<xn::GestureGenerator> gesturegen_uniqueptr(__gesture_gen);
 
   __depth_gen = new xn::DepthGenerator();
-  std::auto_ptr<xn::DepthGenerator> depthgen_autoptr(__depth_gen);
+  std::unique_ptr<xn::DepthGenerator> depthgen_uniqueptr(__depth_gen);
 
   XnStatus st;
 
@@ -174,9 +174,9 @@ OpenNiHandTrackerThread::init()
   // 		      xnGetStatusString(st));
   // }
 
-  handgen_autoptr.release();
-  depthgen_autoptr.release();
-  gesturegen_autoptr.release();
+  handgen_uniqueptr.release();
+  depthgen_uniqueptr.release();
+  gesturegen_uniqueptr.release();
 }
 
 
diff --git a/src/plugins/openni/image_thread.cpp b/src/plugins/openni/image_thread.cpp
index ecc6995..1f84b8a 100644
--- a/src/plugins/openni/image_thread.cpp
+++ b/src/plugins/openni/image_thread.cpp
@@ -66,7 +66,7 @@ OpenNiImageThread::init()
   __cfg_copy_mode = CONVERT_YUV;
 
   __image_gen = new xn::ImageGenerator();
-  std::auto_ptr<xn::ImageGenerator> imagegen_autoptr(__image_gen);
+  std::unique_ptr<xn::ImageGenerator> imagegen_uniqueptr(__image_gen);
 
   XnStatus st;
 
@@ -165,7 +165,7 @@ OpenNiImageThread::init()
   // we can't get any closer than this
   *__capture_start -= (long int)__image_gen->GetTimestamp();
   
-  imagegen_autoptr.release();
+  imagegen_uniqueptr.release();
 }
 
 
diff --git a/src/plugins/openni/pointcloud_thread.cpp b/src/plugins/openni/pointcloud_thread.cpp
index 1102d6c..9ccfa2e 100644
--- a/src/plugins/openni/pointcloud_thread.cpp
+++ b/src/plugins/openni/pointcloud_thread.cpp
@@ -72,9 +72,9 @@ OpenNiPointCloudThread::init()
   __image_rgb_buf = NULL;
 
   __depth_gen = new xn::DepthGenerator();
-  std::auto_ptr<xn::DepthGenerator> depthgen_autoptr(__depth_gen);
+  std::unique_ptr<xn::DepthGenerator> depthgen_uniqueptr(__depth_gen);
   __image_gen = new xn::ImageGenerator();
-  std::auto_ptr<xn::ImageGenerator> imagegen_autoptr(__image_gen);
+  std::unique_ptr<xn::ImageGenerator> imagegen_uniqueptr(__image_gen);
 
   XnStatus st;
 
@@ -206,8 +206,8 @@ OpenNiPointCloudThread::init()
   }
 #endif
 
-  depthgen_autoptr.release();
-  imagegen_autoptr.release();
+  depthgen_uniqueptr.release();
+  imagegen_uniqueptr.release();
 }
 
 
diff --git a/src/plugins/openprs/mod_config.cpp b/src/plugins/openprs/mod_config.cpp
index 0d8d351..8eaeb7d 100644
--- a/src/plugins/openprs/mod_config.cpp
+++ b/src/plugins/openprs/mod_config.cpp
@@ -44,11 +44,7 @@ action_config_load(TermList terms)
   ACTION_ASSERT_ARG_LENGTH("config-load", terms, 1);
   ACTION_SET_AND_ASSERT_ARG_TYPE("config-load", prefix, terms, 1, STRING);
 
-#if __cplusplus >= 201103L
   std::unique_ptr<Configuration::ValueIterator> v(g_config->search(prefix->u.string));
-#else
-  std::auto_ptr<Configuration::ValueIterator> v(g_config->search(prefix->u.string));
-#endif
   while (v->next()) {
     TermList tl = sl_make_slist();
     tl = build_term_list(tl, build_string(v->path()));
diff --git a/src/plugins/perception/pcl-db/mongodb_tf_transformer.cpp b/src/plugins/perception/pcl-db/mongodb_tf_transformer.cpp
index cc909f4..61a389f 100644
--- a/src/plugins/perception/pcl-db/mongodb_tf_transformer.cpp
+++ b/src/plugins/perception/pcl-db/mongodb_tf_transformer.cpp
@@ -132,7 +132,7 @@ MongoDBTransformer::restore(long long start_msec, long long end_msec, long long
   std::list<std::string> collections =
     mongodb_client_->getCollectionNames(database_);
   
-  std::auto_ptr<DBClientCursor> cursor;
+  std::unique_ptr<DBClientCursor> cursor;
   BSONObj doc;
   std::list<std::string>::iterator c;
   for (c = collections.begin(); c != collections.end(); ++c) {
diff --git a/src/plugins/perception/pcl-db/pcl_db_pipeline.h b/src/plugins/perception/pcl-db/pcl_db_pipeline.h
index b1095ce..1736bf2 100644
--- a/src/plugins/perception/pcl-db/pcl_db_pipeline.h
+++ b/src/plugins/perception/pcl-db/pcl_db_pipeline.h
@@ -159,7 +159,7 @@ class PointCloudDBPipeline
     std::string fq_collection = database + "." + collection;
     try {
       for (unsigned int i = 0; i < num_clouds; ++i) {
-	std::auto_ptr<mongo::DBClientCursor> cursor =
+	std::unique_ptr<mongo::DBClientCursor> cursor =
 	  mongodb_client_->query(fq_collection,
 				 QUERY("timestamp" << mongo::LTE << times[i]
                            << mongo::GTE << (times[i] - cfg_pcl_age_tolerance_))
@@ -277,7 +277,7 @@ class PointCloudDBPipeline
     // retrieve point clouds
     for (unsigned int i = 0; i < num_clouds; ++i) {
 
-      std::auto_ptr<mongo::DBClientCursor> cursor =
+      std::unique_ptr<mongo::DBClientCursor> cursor =
 	mongodb_client_->query(database + "." + collection,
 			       QUERY("timestamp" << mongo::LTE << times[i]
                                << mongo::GTE << (times[i] - cfg_pcl_age_tolerance_))
diff --git a/src/plugins/static_transforms/static_transforms_thread.cpp b/src/plugins/static_transforms/static_transforms_thread.cpp
index edd1e33..5a23abe 100644
--- a/src/plugins/static_transforms/static_transforms_thread.cpp
+++ b/src/plugins/static_transforms/static_transforms_thread.cpp
@@ -78,11 +78,7 @@ StaticTransformsThread::entries_get_from_config()
   std::set<std::string> ignored_transforms;
 
   std::string prefix = CFG_PREFIX"transforms/";
-#if __cplusplus >= 201103L
   std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
-#else
-  std::auto_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
-#endif
   while (i->next()) {
     std::string cfg_name = std::string(i->path()).substr(prefix.length());
     cfg_name = cfg_name.substr(0, cfg_name.find("/"));
diff --git a/src/plugins/webview-ptzcam/webview-ptzcam-thread.cpp b/src/plugins/webview-ptzcam/webview-ptzcam-thread.cpp
index a48fb64..0e40cc3 100644
--- a/src/plugins/webview-ptzcam/webview-ptzcam-thread.cpp
+++ b/src/plugins/webview-ptzcam/webview-ptzcam-thread.cpp
@@ -87,11 +87,7 @@ WebviewPtzCamThread::init()
 
   std::map<std::string, std::tuple<std::string, float, float, unsigned int>> presets;
   std::string prefix = "/webview/ptzcam/presets/";
-#if __cplusplus >= 201103L
   std::unique_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
-#else
-  std::auto_ptr<Configuration::ValueIterator> i(config->search(prefix.c_str()));
-#endif
   while (i->next()) {
     std::string cfg_name = std::string(i->path()).substr(prefix.length());
     cfg_name = cfg_name.substr(0, cfg_name.find("/"));
diff --git a/src/tools/lasergui/lasergui.cpp b/src/tools/lasergui/lasergui.cpp
index 6a1e747..fbc1930 100644
--- a/src/tools/lasergui/lasergui.cpp
+++ b/src/tools/lasergui/lasergui.cpp
@@ -160,11 +160,7 @@ class LaserGuiGtkWindow : public Gtk::Window
       md.set_title("Interface Selection Failed");
       md.run();
     } else {
-#if __cplusplus >= 201103L
       std::unique_ptr<MultiInterfaceChooserDialog> ifcd(
-#else
-      std::auto_ptr<MultiInterfaceChooserDialog> ifcd(
-#endif
           MultiInterfaceChooserDialog::create(*this,
                                               __bb,
                                               "Laser*Interface",
diff --git a/src/tools/lasergui/lasergui_hildon.cpp b/src/tools/lasergui/lasergui_hildon.cpp
index 58d1b9a..6a080eb 100644
--- a/src/tools/lasergui/lasergui_hildon.cpp
+++ b/src/tools/lasergui/lasergui_hildon.cpp
@@ -72,7 +72,7 @@ class LaserGuiHildonWindow : public Hildon::Window
     __laser_if = NULL;
     __ifd = NULL;
 
-    std::auto_ptr<Glib::Error> error;
+    std::unique_ptr<Glib::Error> error;
     set_icon_from_file(RESDIR"/guis/lasergui/lines_"ICON_FORMAT".png", error);
 
     add(__area);
diff --git a/src/tools/plugin_gui/main.cpp b/src/tools/plugin_gui/main.cpp
index 4890f9d..cc9a2dd 100644
--- a/src/tools/plugin_gui/main.cpp
+++ b/src/tools/plugin_gui/main.cpp
@@ -54,7 +54,7 @@ int main(int argc, char** argv)
       printf("Failed to create GUI: %s\n", e.what().c_str());
     }
 #else
-    std::auto_ptr<Gtk::BuilderError> error;
+    std::unique_ptr<Gtk::BuilderError> error;
     Glib::RefPtr<Gtk::Builder> builder =
       Gtk::Builder::create_from_file(UI_FILE, error);
     if (error.get()) {
diff --git a/src/tools/skillgui/skillgui.cpp b/src/tools/skillgui/skillgui.cpp
index a6caab3..4365007 100644
--- a/src/tools/skillgui/skillgui.cpp
+++ b/src/tools/skillgui/skillgui.cpp
@@ -237,7 +237,7 @@ SkillGuiGtkWindow::on_config_changed()
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   bool colored    = __gconf->get_bool(GCONF_PREFIX"/graph_colored");
 #else
-  std::auto_ptr<Glib::Error> error;
+  std::unique_ptr<Glib::Error> error;
   bool colored    = __gconf->get_bool(GCONF_PREFIX"/graph_colored", error);
 #endif
   tb_graphcolored->set_active(colored);
diff --git a/src/tools/vision/firestation/main.cpp b/src/tools/vision/firestation/main.cpp
index d1bfced..b322b60 100644
--- a/src/tools/vision/firestation/main.cpp
+++ b/src/tools/vision/firestation/main.cpp
@@ -34,7 +34,7 @@ int main(int argc, char** argv)
     Glib::RefPtr<Gtk::Builder> builder =
       Gtk::Builder::create_from_file(RESDIR"/guis/firestation/firestation.ui");
 #else
-    std::auto_ptr<Gtk::BuilderError> error;
+    std::unique_ptr<Gtk::BuilderError> error;
     Glib::RefPtr<Gtk::Builder> builder =
       Gtk::Builder::create_from_file(RESDIR"/guis/firestation/firestation.ui", error);
 #endif
diff --git a/src/tools/vision/fuse_viewer/main.cpp b/src/tools/vision/fuse_viewer/main.cpp
index 83206ca..ae92bfd 100644
--- a/src/tools/vision/fuse_viewer/main.cpp
+++ b/src/tools/vision/fuse_viewer/main.cpp
@@ -40,7 +40,7 @@ int main(int argc, char** argv)
     Glib::RefPtr<Gtk::Builder> builder =
       Gtk::Builder::create_from_file(RESDIR"/guis/fuse_viewer/fuse_viewer.ui");
 #else
-    std::auto_ptr<Gtk::BuilderError> error;
+    std::unique_ptr<Gtk::BuilderError> error;
     Glib::RefPtr<Gtk::Builder> builder =
       Gtk::Builder::create_from_file(RESDIR"/guis/fuse_viewer/fuse_viewer.ui", error);
     if (error.get()) {

- *commit* ddd162a5375f007c9d30fc9580b7056b2af561ed - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jul 7 18:34:41 2016 +0200
Subject: laser: use fill_n instead of memset to avoid overflow in conversion

 src/plugins/laser/acquisition_thread.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/laser/acquisition_thread.cpp b/src/plugins/laser/acquisition_thread.cpp
index 5aeb019..00e11fd 100644
--- a/src/plugins/laser/acquisition_thread.cpp
+++ b/src/plugins/laser/acquisition_thread.cpp
@@ -186,9 +186,8 @@ LaserAcquisitionThread::alloc_distances(unsigned int num_distances)
 
   _distances_size = num_distances;
   _distances      = (float *)malloc(sizeof(float) * _distances_size);
-  memset(_distances,
-         std::numeric_limits<float>::quiet_NaN(),
-         sizeof(float) * _distances_size);
+  std::fill_n(_distances, _distances_size,
+              std::numeric_limits<float>::quiet_NaN());
 }
 
 

- *commit* 0cf059fd63b7a66991e86d196ea6264111a8e66f - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jul 7 18:37:51 2016 +0200
Subject: colli: isinf is in the namespace std and was removed from the global ns

 src/plugins/colli/utils/rob/roboshape.cpp |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/colli/utils/rob/roboshape.cpp b/src/plugins/colli/utils/rob/roboshape.cpp
index 8a7c8cd..cb5bce4 100644
--- a/src/plugins/colli/utils/rob/roboshape.cpp
+++ b/src/plugins/colli/utils/rob/roboshape.cpp
@@ -59,15 +59,15 @@ RoboShape::RoboShape( const char * cfg_prefix,
   width_add_front_ = width_add_back_ = HUGE_VAL;
   width_add_right_ = width_add_left_ = HUGE_VAL;
 
-  if( (isinf(laser_offset_x_) )
-   && (isinf(laser_offset_y_) )
-   && (isinf(radius_) )
-   && (isinf(width_x_) )
-   && (isinf(width_y_) )
-   && (isinf(width_add_left_) )
-   && (isinf(width_add_right_) )
-   && (isinf(width_add_front_) )
-   && (isinf(width_add_back_) ) ) {
+  if( (std::isinf(laser_offset_x_) )
+   && (std::isinf(laser_offset_y_) )
+   && (std::isinf(radius_) )
+   && (std::isinf(width_x_) )
+   && (std::isinf(width_y_) )
+   && (std::isinf(width_add_left_) )
+   && (std::isinf(width_add_right_) )
+   && (std::isinf(width_add_front_) )
+   && (std::isinf(width_add_back_) ) ) {
     // go on, everything is fine, cause all are infinity
 
   } else {




-- 
Fawkes Robotics Framework                 http://www.fawkesrobotics.org


More information about the fawkes-commits mailing list