diff --git a/OpenEXR/IlmImf/ImfScanLineInputFile.cpp b/OpenEXR/IlmImf/ImfScanLineInputFile.cpp index cfb76f92cd..6f0ac43797 100644 --- a/OpenEXR/IlmImf/ImfScanLineInputFile.cpp +++ b/OpenEXR/IlmImf/ImfScanLineInputFile.cpp @@ -241,6 +241,9 @@ struct ScanLineInputFile::Data: public Mutex Data (int numThreads); ~Data (); + + Data (const Data& other) = delete; + const Data operator = (const Data& other) = delete; inline LineBuffer * getLineBuffer (int number); // hash function from line // buffer indices into our diff --git a/PyIlmBase/PyImath/PyImathStringTable.h b/PyIlmBase/PyImath/PyImathStringTable.h index b5f0bc6f88..2605570c74 100644 --- a/PyIlmBase/PyImath/PyImathStringTable.h +++ b/PyIlmBase/PyImath/PyImathStringTable.h @@ -64,7 +64,9 @@ struct StringTableIndex const StringTableIndex & operator = (const StringTableIndex &si) { - _index = si._index; // NOSONAR - suppress SonarCloud warning + if (&si != this) + _index = si._index; + return *this; } @@ -133,7 +135,7 @@ class StringTableDetailT { > StringTableContainer; }; -} // namespace PyImath +} // namespace typedef StringTableDetailT StringTableDetail; typedef StringTableDetailT WStringTableDetail;