From 72f9e1b27fd42dd47d1bd58cb265ab44ef639f46 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Fri, 16 May 2025 10:43:01 -0700 Subject: [PATCH 1/3] FileSequenceVectorParameter : Whitespace cleanup --- src/IECore/FileSequenceVectorParameter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IECore/FileSequenceVectorParameter.cpp b/src/IECore/FileSequenceVectorParameter.cpp index 3939b09df7..cbe7d7a248 100644 --- a/src/IECore/FileSequenceVectorParameter.cpp +++ b/src/IECore/FileSequenceVectorParameter.cpp @@ -257,7 +257,7 @@ FileSequencePtr FileSequenceVectorParameter::parseFileSequence( const std::strin frameList = FrameList::parse( tail ); found = true; } - + catch ( Exception & ) { fileSequenceCopy = fileSequenceCopy.substr( 0, spaceIndex ) @@ -267,7 +267,7 @@ FileSequencePtr FileSequenceVectorParameter::parseFileSequence( const std::strin spaceIndex = fileSequenceCopy.find_first_of( " " ); } - + } return new FileSequence( filename, frameList ); From 239421aa816e19e7ed6a51b07b5b34b98da5a665 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Fri, 16 May 2025 10:42:29 -0700 Subject: [PATCH 2/3] IECore : Replace deprecated use of `boost::filesystem::extension()` Co-authored-by: MartinFx --- src/IECore/FileNameParameter.cpp | 2 +- src/IECore/FileSequenceParameter.cpp | 4 ++-- src/IECore/FileSequenceVectorParameter.cpp | 4 ++-- src/IECore/IndexedIO.cpp | 6 ++---- src/IECore/Reader.cpp | 4 ++-- src/IECore/Writer.cpp | 6 +++--- src/IECoreScene/SceneInterface.cpp | 4 ++-- 7 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/IECore/FileNameParameter.cpp b/src/IECore/FileNameParameter.cpp index 6dac471876..dc3d966472 100644 --- a/src/IECore/FileNameParameter.cpp +++ b/src/IECore/FileNameParameter.cpp @@ -87,7 +87,7 @@ bool FileNameParameter::valueValid( const Object *value, std::string *reason ) c // extensions check if( extensions().size() ) { - string ext = boost::filesystem::extension(boost::filesystem::path( s->readable())); + string ext = boost::filesystem::path( s->readable() ).extension().string(); const vector &exts = extensions(); bool found = false; diff --git a/src/IECore/FileSequenceParameter.cpp b/src/IECore/FileSequenceParameter.cpp index 399a49cebf..a553cb5f46 100644 --- a/src/IECore/FileSequenceParameter.cpp +++ b/src/IECore/FileSequenceParameter.cpp @@ -41,7 +41,7 @@ #include "boost/algorithm/string/classification.hpp" #include "boost/algorithm/string/split.hpp" -#include "boost/filesystem/convenience.hpp" +#include "boost/filesystem/path.hpp" #include #include @@ -130,7 +130,7 @@ bool FileSequenceParameter::valueValid( const Object *value, std::string *reason if ( m_extensions.size() ) { - std::string ext = boost::filesystem::extension( boost::filesystem::path( fileSequence->getFileName() ) ); + std::string ext = boost::filesystem::path( fileSequence->getFileName() ).extension().string(); if ( ext.size() && ext[0] == '.' ) { ext = ext.substr( 1, ext.size() - 1 ); diff --git a/src/IECore/FileSequenceVectorParameter.cpp b/src/IECore/FileSequenceVectorParameter.cpp index cbe7d7a248..295ebbbe96 100644 --- a/src/IECore/FileSequenceVectorParameter.cpp +++ b/src/IECore/FileSequenceVectorParameter.cpp @@ -41,7 +41,7 @@ #include "boost/algorithm/string/classification.hpp" #include "boost/algorithm/string/split.hpp" -#include "boost/filesystem/convenience.hpp" +#include "boost/filesystem/path.hpp" #include #include @@ -131,7 +131,7 @@ bool FileSequenceVectorParameter::valueValid( const Object *value, std::string * if ( m_extensions.size() ) { - std::string ext = boost::filesystem::extension( boost::filesystem::path( fileSequence->getFileName() ) ); + std::string ext = boost::filesystem::path( fileSequence->getFileName() ).extension().string(); if ( ext.size() && ext[0] == '.' ) { ext = ext.substr( 1, ext.size() - 1 ); diff --git a/src/IECore/IndexedIO.cpp b/src/IECore/IndexedIO.cpp index b6af9d3bb8..0e24feb287 100644 --- a/src/IECore/IndexedIO.cpp +++ b/src/IECore/IndexedIO.cpp @@ -36,7 +36,7 @@ #include "IECore/Exception.h" -#include "boost/filesystem/convenience.hpp" +#include "boost/filesystem/path.hpp" #include "boost/algorithm/string.hpp" #include @@ -67,8 +67,6 @@ static CreatorMap &creators() IE_CORE_DEFINERUNTIMETYPEDDESCRIPTION( IndexedIO ) -namespace fs = boost::filesystem; - const IndexedIO::EntryID IndexedIO::rootName("/"); const IndexedIO::EntryIDList IndexedIO::rootPath; @@ -76,7 +74,7 @@ IndexedIOPtr IndexedIO::create( const std::string &path, const IndexedIO::EntryI { IndexedIOPtr result = nullptr; - std::string extension = fs::extension(path); + std::string extension = boost::filesystem::path( path ).extension().string(); boost::to_lower( extension ); const CreatorMap &createFns = creators(); diff --git a/src/IECore/Reader.cpp b/src/IECore/Reader.cpp index 40e7d06d3c..2254eb4631 100644 --- a/src/IECore/Reader.cpp +++ b/src/IECore/Reader.cpp @@ -40,7 +40,7 @@ #include "boost/algorithm/string/classification.hpp" #include "boost/algorithm/string/split.hpp" -#include "boost/filesystem/convenience.hpp" +#include "boost/filesystem/path.hpp" using namespace std; using namespace IECore; @@ -84,7 +84,7 @@ ReaderPtr Reader::create( const std::string &fileName ) bool knownExtension = false; ExtensionsToFnsMap *m = extensionsToFns(); assert( m ); - string ext = extension(boost::filesystem::path(fileName)); + string ext = boost::filesystem::path( fileName ).extension().string(); if( ext!="" ) { ExtensionsToFnsMap::const_iterator it = m->find( ext ); diff --git a/src/IECore/Writer.cpp b/src/IECore/Writer.cpp index 151b6a7607..d61d23a9d9 100644 --- a/src/IECore/Writer.cpp +++ b/src/IECore/Writer.cpp @@ -41,7 +41,7 @@ #include "boost/algorithm/string/classification.hpp" #include "boost/algorithm/string/split.hpp" -#include "boost/filesystem/convenience.hpp" +#include "boost/filesystem/path.hpp" #include @@ -116,7 +116,7 @@ void Writer::registerWriter( const std::string &extensions, CanWriteFn canWrite, WriterPtr Writer::create( ObjectPtr object, const std::string &fileName ) { - string ext = extension(boost::filesystem::path(fileName)); + string ext = boost::filesystem::path( fileName ).extension().string(); ExtensionsToFnsMap *m = extensionsToFns(); assert( m ); @@ -146,7 +146,7 @@ WriterPtr Writer::create( ObjectPtr object, const std::string &fileName ) WriterPtr Writer::create( const std::string &fileName ) { - string ext = extension(boost::filesystem::path(fileName)); + string ext = boost::filesystem::path( fileName ).extension().string(); ExtensionsToFnsMap *m = extensionsToFns(); ExtensionsToFnsMap::const_iterator it = m->find( ext ); diff --git a/src/IECoreScene/SceneInterface.cpp b/src/IECoreScene/SceneInterface.cpp index 661d7ef276..4dfb791fef 100644 --- a/src/IECoreScene/SceneInterface.cpp +++ b/src/IECoreScene/SceneInterface.cpp @@ -34,7 +34,7 @@ #include "IECoreScene/SceneInterface.h" -#include "boost/filesystem/convenience.hpp" +#include "boost/filesystem/path.hpp" #include "boost/tokenizer.hpp" #include "boost/algorithm/string.hpp" @@ -104,7 +104,7 @@ SceneInterfacePtr SceneInterface::create( const std::string &path, IndexedIO::Op { SceneInterfacePtr result = nullptr; - std::string extension = boost::filesystem::extension(path); + std::string extension = boost::filesystem::path( path ).extension().string(); boost::algorithm::to_lower( extension ); IndexedIO::OpenModeFlags openMode = IndexedIO::OpenModeFlags( mode & (IndexedIO::Read|IndexedIO::Write|IndexedIO::Append) ); std::pair< std::string, IndexedIO::OpenModeFlags > key( extension, openMode ); From bf4bd5b0421dad34c8370a985048f1dd538c2d60 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Fri, 16 May 2025 10:43:57 -0700 Subject: [PATCH 3/3] SearchPath : Replace `is_complete()` with `is_absolute()` Co-authored-by: MartinFx --- Changes | 3 +++ src/IECore/SearchPath.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 4b467224be..20c94fe9ea 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,10 @@ 10.5.x.x (relative to 10.5.14.0) ======== +Fixes +----- +- Boost : Fixed compatibility with Boost 1.82. 10.5.14.0 (relative to 10.5.13.1) ========= diff --git a/src/IECore/SearchPath.cpp b/src/IECore/SearchPath.cpp index 372e393565..e92933b0ca 100644 --- a/src/IECore/SearchPath.cpp +++ b/src/IECore/SearchPath.cpp @@ -106,7 +106,7 @@ std::string SearchPath::getPaths( const std::string &separator ) const boost::filesystem::path SearchPath::find( const boost::filesystem::path &file ) const { // if it's a full path then there's no need to do any searching - if( file.is_complete() ) + if( file.is_absolute() ) { if( exists( file ) ) {