mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 22:00:33 +05:00
Throw Exception when shape has invalid type
Although the switch statement handles all (current) allowed values, from a C/C++ view point the enum may have any value of its underlying type. In this case the function has no return statement and runs into undefined behavior. Fixes build failures when built with "-Werror=return-type".
This commit is contained in:
parent
86fd2983c7
commit
54246e12ad
@ -194,6 +194,7 @@ py::object CastShape(const TopoDS_Shape & s)
|
|||||||
case TopAbs_SHAPE:
|
case TopAbs_SHAPE:
|
||||||
return py::cast(s);
|
return py::cast(s);
|
||||||
}
|
}
|
||||||
|
throw Exception("Invalid Shape type");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user