From b793e128fc1b6d2b43d90e1e4c3bf9122db92424 Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Mon, 6 Jul 2020 12:55:31 +0200 Subject: [PATCH] Changed the deprecated auto_ptr for the unique_ptr. Changed the xsd library to generate code with the C++11 standard. wq --- src/dynamixel_pan_tilt.cpp | 4 ++-- src/xml/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dynamixel_pan_tilt.cpp b/src/dynamixel_pan_tilt.cpp index 99f32ab..f0894d8 100644 --- a/src/dynamixel_pan_tilt.cpp +++ b/src/dynamixel_pan_tilt.cpp @@ -200,7 +200,7 @@ void CDynamixel_Pan_Tilt::load_config(std::string &filename) { // try to open the specified file try{ - std::auto_ptr<dynamixel_pan_tilt_config_t> cfg(dynamixel_pan_tilt_config(filename.c_str(), xml_schema::flags::dont_validate)); + std::unique_ptr<dynamixel_pan_tilt_config_t> cfg(dynamixel_pan_tilt_config(filename.c_str(), xml_schema::flags::dont_validate)); // configure the parameters of the controller if (cfg->alarm_shtdwn().present()) { @@ -368,7 +368,7 @@ void CDynamixel_Pan_Tilt::read_config(std::string &filename, Dynamixel_pan_tilt_ { // try to open the specified file try{ - std::auto_ptr<dynamixel_pan_tilt_config_t> cfg(dynamixel_pan_tilt_config(filename.c_str(), xml_schema::flags::dont_validate)); + std::unique_ptr<dynamixel_pan_tilt_config_t> cfg(dynamixel_pan_tilt_config(filename.c_str(), xml_schema::flags::dont_validate)); // configure the parameters of the controller dynamixel_pan_tilt_config_t::min_angle_const_iterator min_angle (cfg->min_angle().begin()); diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt index 638faa4..d3c85df 100644 --- a/src/xml/CMakeLists.txt +++ b/src/xml/CMakeLists.txt @@ -37,7 +37,7 @@ IF(XSD_FOUND) ADD_CUSTOM_TARGET(xsd_files_gen DEPENDS ${XSD_SOURCES_INT}) ADD_CUSTOM_COMMAND( OUTPUT ${XSD_SOURCES_INT} - COMMAND xsdcxx cxx-tree --generate-serialization ${XSD_FILES} + COMMAND xsdcxx cxx-tree --std c++11 --generate-serialization ${XSD_FILES} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${XSD_PATH_FILES} COMMENT "Parsing the xml template file ${XSD_FILES}") -- GitLab