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:
@@ -323,7 +323,7 @@ static Standard_Integer dbreak(Draw_Interpretor& di, Standard_Integer, const cha
|
||||
try {
|
||||
OSD::ControlBreak();
|
||||
}
|
||||
catch (OSD_Exception_CTRL_BREAK) {
|
||||
catch (OSD_Exception_CTRL_BREAK const&) {
|
||||
di << "User pressed Control-Break";
|
||||
return 1; // Tcl exception
|
||||
}
|
||||
|
@@ -551,7 +551,7 @@ Draw_Interpretor::~Draw_Interpretor()
|
||||
OCC_CATCH_SIGNALS
|
||||
Tcl_Exit(0);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
catch (Standard_Failure const&) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"Tcl_Exit have an exeption" << endl;
|
||||
#endif
|
||||
|
@@ -1105,7 +1105,7 @@ Standard_Boolean Init_Appli()
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
Tk_Init(interp) ;
|
||||
} catch (Standard_Failure) {
|
||||
} catch (Standard_Failure const&) {
|
||||
cout <<" Pb au lancement de TK_Init "<<endl;
|
||||
}
|
||||
|
||||
@@ -1135,7 +1135,7 @@ Standard_Boolean Init_Appli()
|
||||
{
|
||||
Draw_DisplayConnection = new Aspect_DisplayConnection();
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
catch (Standard_Failure const&)
|
||||
{
|
||||
std::cout << "Cannot open display. Interpret commands in batch mode." << std::endl;
|
||||
return Standard_False;
|
||||
@@ -1293,7 +1293,7 @@ static void StdinProc(ClientData clientData, int )
|
||||
prompt:
|
||||
if (tty) Prompt(Draw::GetInterpretor().Interp(), gotPartial);
|
||||
|
||||
} catch (Standard_Failure) {}
|
||||
} catch (Standard_Failure const&) {}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user