diff --git a/urdf/CMakeLists.txt b/urdf/CMakeLists.txt index cb1e0d50..e0c9e186 100644 --- a/urdf/CMakeLists.txt +++ b/urdf/CMakeLists.txt @@ -25,6 +25,9 @@ configure_file(urdfdom_compatibility.h.in "${generated_compat_header}" @ONLY) if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 14) endif() +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() install(FILES ${generated_compat_header} DESTINATION include/${PROJECT_NAME}) diff --git a/urdf/src/model.cpp b/urdf/src/model.cpp index 047411aa..ea6c974c 100644 --- a/urdf/src/model.cpp +++ b/urdf/src/model.cpp @@ -105,7 +105,7 @@ ModelImplementation::load_plugin(const std::string & plugin_name) } catch (const pluginlib::CreateClassException &) { fprintf(stderr, "Failed to load urdf_parser_plugin [%s]\n", plugin_name.c_str()); } - return std::move(plugin_instance); + return plugin_instance; } bool Model::initString(const std::string & data)