mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0030611: Coding Rules - eliminate GCC compiler warnings -Wcatch-value
Add missing const& to catch statements.
This commit is contained in:
@@ -60,13 +60,13 @@ Standard_Boolean Storage_HeaderData::Read (Storage_BaseDriver& theDriver)
|
||||
myDataType,
|
||||
myUserInfo);
|
||||
}
|
||||
catch (Storage_StreamTypeMismatchError)
|
||||
catch (Storage_StreamTypeMismatchError const&)
|
||||
{
|
||||
myErrorStatus = Storage_VSTypeMismatch;
|
||||
myErrorStatusExt = "ReadInfo";
|
||||
return Standard_False;
|
||||
}
|
||||
catch (Storage_StreamExtCharParityError)
|
||||
catch (Storage_StreamExtCharParityError const&)
|
||||
{
|
||||
myErrorStatus = Storage_VSExtCharParityError;
|
||||
myErrorStatusExt = "ReadInfo";
|
||||
@@ -95,13 +95,13 @@ Standard_Boolean Storage_HeaderData::Read (Storage_BaseDriver& theDriver)
|
||||
OCC_CATCH_SIGNALS
|
||||
theDriver.ReadComment (myComments);
|
||||
}
|
||||
catch (Storage_StreamTypeMismatchError)
|
||||
catch (Storage_StreamTypeMismatchError const&)
|
||||
{
|
||||
myErrorStatus = Storage_VSTypeMismatch;
|
||||
myErrorStatusExt = "ReadComment";
|
||||
return Standard_False;
|
||||
}
|
||||
catch (Storage_StreamExtCharParityError)
|
||||
catch (Storage_StreamExtCharParityError const&)
|
||||
{
|
||||
myErrorStatus = Storage_VSExtCharParityError;
|
||||
myErrorStatusExt = "ReadComment";
|
||||
|
@@ -59,7 +59,7 @@ Standard_Boolean Storage_RootData::Read (Storage_BaseDriver& theDriver)
|
||||
OCC_CATCH_SIGNALS
|
||||
theDriver.ReadRoot (aRootName, aRef, aTypeName);
|
||||
}
|
||||
catch (Storage_StreamTypeMismatchError)
|
||||
catch (Storage_StreamTypeMismatchError const&)
|
||||
{
|
||||
myErrorStatus = Storage_VSTypeMismatch;
|
||||
myErrorStatusExt = "ReadRoot";
|
||||
|
@@ -484,7 +484,7 @@ void Storage_Schema::Write
|
||||
errorContext = "EndWriteDataSection";
|
||||
f.EndWriteDataSection();
|
||||
}
|
||||
catch(Storage_StreamWriteError) {
|
||||
catch(Storage_StreamWriteError const&) {
|
||||
aData->SetErrorStatus(Storage_VSWriteError);
|
||||
aData->SetErrorStatusExtension(errorContext);
|
||||
}
|
||||
|
Reference in New Issue
Block a user