Skip to content

Commit de09827

Browse files
johnsonshihmikaelarguedas
authored andcommitted
Fix build issue when build on Windows (#123)
* fix build issue when build on Windows * proper indent * replace with standard attribute specifier
1 parent 2c6e3b8 commit de09827

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

pluginlib/include/pluginlib/class_loader.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class ClassLoader : public ClassLoaderBase
9090
* \return An instance of the class
9191
* \deprecated use either createInstance() or createUnmanagedInstance()
9292
*/
93-
__attribute__((deprecated)) T * createClassInstance(
93+
[[deprecated]] T * createClassInstance(
9494
const std::string & lookup_name,
9595
bool auto_load = true);
9696

pluginlib/include/pluginlib/class_loader_imp.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,11 @@ std::string ClassLoader<T>::getPathSeparator()
547547
/***************************************************************************/
548548
{
549549
#if BOOST_FILESYSTEM_VERSION >= 3
550-
return boost::filesystem::path("/").native();
550+
# ifdef _WIN32
551+
return boost::filesystem::path("/").string();
552+
# else
553+
return boost::filesystem::path("/").native();
554+
# endif
551555
#else
552556
return boost::filesystem::path("/").external_file_string();
553557
#endif

0 commit comments

Comments
 (0)