From: wolf Date: Fri, 12 Feb 1999 12:14:22 +0000 (+0000) Subject: Fix a really annoying problem introduced by including cstdlib: This bought us an... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdc56c55f560eee040544d50d82060c2a7bc2b0e;p=dealii-svn.git Fix a really annoying problem introduced by including cstdlib: This bought us an ambiguity between abs(int) and abs(long int) when calling it with the difference between two unsigned integers... Sometimes C++ is less than only C. git-svn-id: https://svn.dealii.org/trunk@789 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/dsmatrix.cc b/deal.II/lac/source/dsmatrix.cc index cc1925ef70..16ec70d8f7 100644 --- a/deal.II/lac/source/dsmatrix.cc +++ b/deal.II/lac/source/dsmatrix.cc @@ -346,8 +346,8 @@ dSMatrixStruct::bandwidth () const for (unsigned int j=rowstart[i]; j=0) { - if ((unsigned int)abs(i-colnums[j]) > b) - b = abs(i-colnums[j]); + if (static_cast(abs(static_cast(i-colnums[j]))) > b) + b = abs(static_cast(i-colnums[j])); } else // leave if at the end of