From f5bb142b22fa6ca3561621a180d88a2bcfdeae24 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 21 Nov 2019 15:29:48 -0500 Subject: [PATCH] Avoid warnings in python-bindings --- contrib/python-bindings/source/cell_accessor_wrapper.cc | 8 ++++---- contrib/python-bindings/source/tria_accessor_wrapper.cc | 8 ++++---- contrib/python-bindings/source/triangulation_wrapper.cc | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/python-bindings/source/cell_accessor_wrapper.cc b/contrib/python-bindings/source/cell_accessor_wrapper.cc index 3a5ab80b50..7f09256a71 100644 --- a/contrib/python-bindings/source/cell_accessor_wrapper.cc +++ b/contrib/python-bindings/source/cell_accessor_wrapper.cc @@ -505,8 +505,8 @@ namespace python void CellAccessorWrapper::set_vertex(const int i, PointWrapper &point_wrapper) { - AssertThrow(i < std::pow(2, dim), - ExcVertexDoesNotExist(i, std::pow(2, dim))); + AssertThrow(i < static_cast(Utilities::pow(2, dim)), + ExcVertexDoesNotExist(i, Utilities::pow(2, dim))); if ((dim == 2) && (spacedim == 2)) internal::set_vertex<2, 2>(i, point_wrapper, cell_accessor); else if ((dim == 2) && (spacedim == 3)) @@ -520,8 +520,8 @@ namespace python PointWrapper CellAccessorWrapper::get_vertex(const int i) const { - AssertThrow(i < std::pow(2, dim), - ExcVertexDoesNotExist(i, std::pow(2, dim))); + AssertThrow(i < static_cast(Utilities::pow(2, dim)), + ExcVertexDoesNotExist(i, Utilities::pow(2, dim))); if ((dim == 2) && (spacedim == 2)) return internal::get_vertex<2, 2>(i, cell_accessor); else if ((dim == 2) && (spacedim == 3)) diff --git a/contrib/python-bindings/source/tria_accessor_wrapper.cc b/contrib/python-bindings/source/tria_accessor_wrapper.cc index 49188e9512..0e434b328a 100644 --- a/contrib/python-bindings/source/tria_accessor_wrapper.cc +++ b/contrib/python-bindings/source/tria_accessor_wrapper.cc @@ -272,8 +272,8 @@ namespace python void TriaAccessorWrapper::set_vertex(const int i, PointWrapper &point_wrapper) { - AssertThrow(i < std::pow(2, dim), - ExcVertexDoesNotExist(i, std::pow(2, dim))); + AssertThrow(i < static_cast(Utilities::pow(2, dim)), + ExcVertexDoesNotExist(i, Utilities::pow(2, dim))); if ((dim == 2) && (spacedim == 2) && (structdim == 1)) internal::set_vertex<1, 2, 2>(i, point_wrapper, tria_accessor); else if ((dim == 2) && (spacedim == 3) && (structdim == 1)) @@ -287,8 +287,8 @@ namespace python PointWrapper TriaAccessorWrapper::get_vertex(const int i) const { - AssertThrow(i < std::pow(2, dim), - ExcVertexDoesNotExist(i, std::pow(2, dim))); + AssertThrow(i < static_cast(Utilities::pow(2, dim)), + ExcVertexDoesNotExist(i, Utilities::pow(2, dim))); if ((dim == 2) && (spacedim == 2) && (structdim == 1)) return internal::get_vertex<1, 2, 2>(i, tria_accessor); else if ((dim == 2) && (spacedim == 3) && (structdim == 1)) diff --git a/contrib/python-bindings/source/triangulation_wrapper.cc b/contrib/python-bindings/source/triangulation_wrapper.cc index cce5a86757..3e28e49104 100644 --- a/contrib/python-bindings/source/triangulation_wrapper.cc +++ b/contrib/python-bindings/source/triangulation_wrapper.cc @@ -326,7 +326,7 @@ namespace python generate_enclosed_hyper_cube(const double left, const double right, const double thickness, - const double colorize, + const bool colorize, void * triangulation) { Triangulation *tria = -- 2.39.5