Skip to content
Snippets Groups Projects
Commit 9984c64d authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Changed the deprecated auto_ptr for the unique_ptr.

Changed the xsd library to generate code with the C++11 standard.
parent 436e1134
No related branches found
No related tags found
1 merge request!1Changed the deprecated auto_ptr for the unique_ptr.
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
...@@ -68,7 +68,7 @@ void CDynamixelSlaveFTDI::config(std::string &filename) ...@@ -68,7 +68,7 @@ void CDynamixelSlaveFTDI::config(std::string &filename)
{ {
// try to open the specified file // try to open the specified file
try{ try{
std::auto_ptr<dyn_server_ftdi_config_t> cfg(dyn_server_ftdi_config(filename.c_str(), xml_schema::flags::dont_validate)); std::unique_ptr<dyn_server_ftdi_config_t> cfg(dyn_server_ftdi_config(filename.c_str(), xml_schema::flags::dont_validate));
this->config_bus(cfg->serial_num(),cfg->baudrate()); this->config_bus(cfg->serial_num(),cfg->baudrate());
}catch (const xml_schema::exception& e){ }catch (const xml_schema::exception& e){
std::ostringstream os; std::ostringstream os;
......
...@@ -87,7 +87,7 @@ void CDynamixelServerFTDI::config(std::string &filename) ...@@ -87,7 +87,7 @@ void CDynamixelServerFTDI::config(std::string &filename)
{ {
// try to open the specified file // try to open the specified file
try{ try{
std::auto_ptr<dyn_server_ftdi_config_t> cfg(dyn_server_ftdi_config(filename.c_str(), xml_schema::flags::dont_validate)); std::unique_ptr<dyn_server_ftdi_config_t> cfg(dyn_server_ftdi_config(filename.c_str(), xml_schema::flags::dont_validate));
this->config_bus(cfg->serial_num(),cfg->baudrate()); this->config_bus(cfg->serial_num(),cfg->baudrate());
}catch (const xml_schema::exception& e){ }catch (const xml_schema::exception& e){
std::ostringstream os; std::ostringstream os;
......
...@@ -64,7 +64,7 @@ void CDynamixelServerSerial::config(std::string &filename) ...@@ -64,7 +64,7 @@ void CDynamixelServerSerial::config(std::string &filename)
{ {
// try to open the specified file // try to open the specified file
try{ try{
std::auto_ptr<dyn_server_serial_config_t> cfg(dyn_server_serial_config(filename.c_str(), xml_schema::flags::dont_validate)); std::unique_ptr<dyn_server_serial_config_t> cfg(dyn_server_serial_config(filename.c_str(), xml_schema::flags::dont_validate));
this->config_bus(cfg->serial_dev(),cfg->baudrate()); this->config_bus(cfg->serial_dev(),cfg->baudrate());
}catch (const xml_schema::exception& e){ }catch (const xml_schema::exception& e){
std::ostringstream os; std::ostringstream os;
......
...@@ -36,7 +36,7 @@ IF(XSD_FOUND) ...@@ -36,7 +36,7 @@ IF(XSD_FOUND)
ADD_CUSTOM_TARGET(xsd_files_gen DEPENDS ${XSD_SOURCES_INT}) ADD_CUSTOM_TARGET(xsd_files_gen DEPENDS ${XSD_SOURCES_INT})
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
OUTPUT ${XSD_SOURCES_INT} 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} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${XSD_PATH_FILES} DEPENDS ${XSD_PATH_FILES}
COMMENT "Parsing the xml template file ${XSD_FILES}") COMMENT "Parsing the xml template file ${XSD_FILES}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment