1
0
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:
kgv
2019-03-31 23:38:14 +03:00
parent f996b507d8
commit a738b534ca
106 changed files with 210 additions and 213 deletions

View File

@@ -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();

View File

@@ -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;