]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid warning 'unsigned expression < 0 always false'
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 7 Oct 2020 12:45:21 +0000 (14:45 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 7 Oct 2020 12:45:21 +0000 (14:45 +0200)
include/deal.II/base/point.h

index 26ba0a7c37ac3d7bf15db3902cfd630604cede21..90f31615c5897f8ef741e49754081a2194192ce1 100644 (file)
@@ -471,7 +471,7 @@ inline DEAL_II_CUDA_HOST_DEV Number
 Point<dim, Number>::operator()(const unsigned int index) const
 {
 #  ifndef __CUDA_ARCH__
-  AssertIndexRange(index, dim);
+  AssertIndexRange(static_cast<int>(index), dim);
 #  endif
   return this->values[index];
 }
@@ -483,7 +483,7 @@ inline DEAL_II_CUDA_HOST_DEV Number &
 Point<dim, Number>::operator()(const unsigned int index)
 {
 #  ifndef __CUDA_ARCH__
-  AssertIndexRange(index, dim);
+  AssertIndexRange(static_cast<int>(index), dim);
 #  endif
   return this->values[index];
 }

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.