1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-30 12:14:08 +03:00

0033032: Samples - Warning on Ubuntu 20.04

Fix warnings:
* catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=]
* this 'if' clause does not guard... [-Wmisleading-indentation]
This commit is contained in:
azv 2022-06-29 17:32:17 +03:00 committed by smoskvin
parent 3e06b70623
commit aaacd83510

View File

@ -221,7 +221,7 @@ Handle(TopTools_HSequenceOfShape) Translate::importModel( const int format, cons
shapes = importSTEP( file ); shapes = importSTEP( file );
break; break;
} }
} catch ( Standard_Failure ) { } catch ( const Standard_Failure& ) {
shapes.Nullify(); shapes.Nullify();
} }
return shapes; return shapes;
@ -256,7 +256,7 @@ bool Translate::exportModel( const int format, const QString& file, const Handle
case FormatSTL: return exportSTL ( file, shapes ); case FormatSTL: return exportSTL ( file, shapes );
case FormatVRML: return exportVRML( file, shapes ); case FormatVRML: return exportVRML( file, shapes );
} }
} catch ( Standard_Failure ) { } catch ( const Standard_Failure& ) {
// //
} }
return false; return false;