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

Changed the auto_ptr for the unique_ptr.

The added the --std c++11 to the xsdcxx command call.
parent a4a32b5f
No related branches found
No related tags found
No related merge requests found
...@@ -225,7 +225,7 @@ void CDarwinMManager::load_config(std::string &filename) ...@@ -225,7 +225,7 @@ void CDarwinMManager::load_config(std::string &filename)
if(stat(filename.c_str(),&buffer)==0) if(stat(filename.c_str(),&buffer)==0)
{ {
try{ try{
std::auto_ptr<darwin_config_t> cfg(darwin_config(filename.c_str(), xml_schema::flags::dont_validate)); std::unique_ptr<darwin_config_t> cfg(darwin_config(filename.c_str(), xml_schema::flags::dont_validate));
for(iterator=cfg->servo().begin(),i=0;iterator!=cfg->servo().end();iterator++,i++) for(iterator=cfg->servo().begin(),i=0;iterator!=cfg->servo().end();iterator++,i++)
this->mm_assign_module(iterator->name(),iterator->motion_module()); this->mm_assign_module(iterator->name(),iterator->motion_module());
}catch(const xml_schema::exception& e){ }catch(const xml_schema::exception& e){
......
...@@ -857,7 +857,7 @@ void CDarwinRobot::mm_load_config(std::string &filename) ...@@ -857,7 +857,7 @@ void CDarwinRobot::mm_load_config(std::string &filename)
if(stat(filename.c_str(),&buffer)==0) if(stat(filename.c_str(),&buffer)==0)
{ {
try{ try{
std::auto_ptr<darwin_config_t> cfg(darwin_config(filename.c_str(), xml_schema::flags::dont_validate)); std::unique_ptr<darwin_config_t> cfg(darwin_config(filename.c_str(), xml_schema::flags::dont_validate));
for(iterator=cfg->servo().begin(),i=0;iterator!=cfg->servo().end();iterator++,i++) for(iterator=cfg->servo().begin(),i=0;iterator!=cfg->servo().end();iterator++,i++)
this->mm_assign_module(iterator->name(),iterator->motion_module()); this->mm_assign_module(iterator->name(),iterator->motion_module());
}catch(const xml_schema::exception& e){ }catch(const xml_schema::exception& e){
......
...@@ -33,13 +33,13 @@ IF(XSD_FOUND) ...@@ -33,13 +33,13 @@ 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}")
INSTALL(FILES ${XSD_PATH_FILES} DESTINATION include/iridrivers/xml) INSTALL(FILES ${XSD_PATH_FILES} DESTINATION include/iri/${PROJECT_NAME}/xml)
INSTALL(FILES ${XSD_HEADERS_INT} DESTINATION include/iridrivers/xml) INSTALL(FILES ${XSD_HEADERS_INT} DESTINATION include/iri/${PROJECT_NAME}/xml)
ENDIF(XSD_FILES) ENDIF(XSD_FILES)
ENDIF(XSD_FOUND) ENDIF(XSD_FOUND)
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