Skip to content

Commit

Permalink
Replace boost::filesystem::extension() (#1844)
Browse files Browse the repository at this point in the history
boost::filesystem::extension was deprecated in Boost 1.77 and removed in 1.85
https://www.boost.org/doc/libs/1_87_0_beta1/libs/filesystem/doc/release_history.html

The alternative, calling the member function extension() on boost::fs::path works on Noetic.
  • Loading branch information
akazxd authored Dec 11, 2024
1 parent fdcf656 commit 250c0c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rviz/mesh_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void loadTexture(const std::string& resource_path)
{
Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(res.data.get(), res.size));
Ogre::Image image;
std::string extension = fs::extension(fs::path(resource_path));
std::string extension = fs::path(resource_path).extension().string();

if (extension[0] == '.')
{
Expand Down
2 changes: 1 addition & 1 deletion src/rviz/robot/robot_link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ Ogre::MaterialPtr RobotLink::getMaterialForLink(const urdf::LinkConstSharedPtr&
{
Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(res.data.get(), res.size));
Ogre::Image image;
std::string extension = fs::extension(fs::path(filename));
std::string extension = fs::path(filename).extension().string();

if (extension[0] == '.')
{
Expand Down

0 comments on commit 250c0c2

Please sign in to comment.