Fix a warning [-Wcatch-value]

```
test/Polyhedron_Demo/MainWindow.cpp:1075:26: warning: catching polymorphic type 'class std::logic_error' by value [-Wcatch-value=]
test/Polyhedron_Demo/Plugins/Mesh_2/Mesh_2_plugin.cpp:287:6: warning: catching polymorphic type 'class std::runtime_error' by value [-Wcatch-value=]
```
This commit is contained in:
Laurent Rineau 2017-12-04 11:55:51 +01:00
parent e400b3328d
commit 3f6400b40e
2 changed files with 2 additions and 2 deletions

View File

@ -1071,7 +1071,7 @@ bool MainWindow::open(QString filename, QString loader_name) {
if(!item_opt) return false; if(!item_opt) return false;
else item = *item_opt; else item = *item_opt;
} }
catch(std::logic_error e) { catch(std::logic_error& e) {
std::cerr << e.what() << std::endl; std::cerr << e.what() << std::endl;
return false; return false;
} }

View File

@ -284,7 +284,7 @@ private:
Q_FOREACH(const std::vector<Kernel::Point_3>& points, Q_FOREACH(const std::vector<Kernel::Point_3>& points,
polylines_item->polylines) polylines_item->polylines)
cdt.insert_constraint(points.begin(),points.end()); cdt.insert_constraint(points.begin(),points.end());
}catch(std::runtime_error) }catch(std::runtime_error&)
{ {
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
throw; throw;