]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid warnings in python-bindings 9079/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 21 Nov 2019 20:29:48 +0000 (15:29 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 21 Nov 2019 22:59:45 +0000 (17:59 -0500)
contrib/python-bindings/source/cell_accessor_wrapper.cc
contrib/python-bindings/source/tria_accessor_wrapper.cc
contrib/python-bindings/source/triangulation_wrapper.cc

index 3a5ab80b507ab1b0ee6b14b4776f69fa09ada0e5..7f09256a7136550a8d5c66911b72ce37a623fb7e 100644 (file)
@@ -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<int>(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<int>(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))
index 49188e9512df7d437f382d83240a8bf6f848cefa..0e434b328aa7eb4b7277a92af172683b1caabcb3 100644 (file)
@@ -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<int>(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<int>(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))
index cce5a8675773f1b6ea9e25ec44b1c35b0533d6e2..3e28e491045bb7f10e39e380c27960d1e672ddf9 100644 (file)
@@ -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<dim> *tria =

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.