From fdc56c55f560eee040544d50d82060c2a7bc2b0e Mon Sep 17 00:00:00 2001 From: wolf Date: Fri, 12 Feb 1999 12:14:22 +0000 Subject: [PATCH] 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 --- deal.II/lac/source/dsmatrix.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5