mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0030611: Coding Rules - eliminate GCC compiler warnings -Wcatch-value
Add missing const& to catch statements.
This commit is contained in:
@@ -146,7 +146,7 @@ TCollection_ExtendedString PCDM_ReadWriter::FileFormat
|
||||
theFormat = td.Types()->Value(1);
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {}
|
||||
catch (Standard_Failure const&) {}
|
||||
|
||||
|
||||
if(theFileIsOpen)theFileDriver->Close();
|
||||
|
@@ -251,7 +251,7 @@ Standard_Integer PCDM_ReadWriter_1::ReadReferenceCounter(const TCollection_Exten
|
||||
for ( i =1; i<= refUserInfo.Length() ; i++) {
|
||||
if(refUserInfo(i).Search(REFERENCE_COUNTER) != -1) {
|
||||
try { OCC_CATCH_SIGNALS theReferencesCounter=refUserInfo(i).Token(" ",2).IntegerValue();}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure const&) {
|
||||
// cout << "warning: could not read the reference counter in " << aFileName << endl;
|
||||
TCollection_ExtendedString aMsg("Warning: ");
|
||||
aMsg = aMsg.Cat("could not read the reference counter in ").Cat(aFileName).Cat("\0");
|
||||
@@ -262,7 +262,7 @@ Standard_Integer PCDM_ReadWriter_1::ReadReferenceCounter(const TCollection_Exten
|
||||
}
|
||||
|
||||
}
|
||||
catch (Standard_Failure) {}
|
||||
catch (Standard_Failure const&) {}
|
||||
|
||||
if(theFileIsOpen) theFileDriver->Close();
|
||||
|
||||
@@ -400,7 +400,7 @@ Standard_Integer PCDM_ReadWriter_1::ReadDocumentVersion(const TCollection_Extend
|
||||
for ( i =1; i<= refUserInfo.Length() ; i++) {
|
||||
if(refUserInfo(i).Search(MODIFICATION_COUNTER) != -1) {
|
||||
try { OCC_CATCH_SIGNALS theVersion=refUserInfo(i).Token(" ",2).IntegerValue();}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure const&) {
|
||||
// cout << "warning: could not read the version in " << aFileName << endl;
|
||||
TCollection_ExtendedString aMsg("Warning: ");
|
||||
aMsg = aMsg.Cat("could not read the version in ").Cat(aFileName).Cat("\0");
|
||||
@@ -412,7 +412,7 @@ Standard_Integer PCDM_ReadWriter_1::ReadDocumentVersion(const TCollection_Extend
|
||||
}
|
||||
}
|
||||
|
||||
catch (Standard_Failure) {}
|
||||
catch (Standard_Failure const&) {}
|
||||
|
||||
if(theFileIsOpen) theFileDriver->Close();
|
||||
delete theFileDriver;
|
||||
|
Reference in New Issue
Block a user