From 966947d4d67bc89561f085ea34be50b3e26c94fe Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 25 Jan 2007 20:57:20 +0000 Subject: [PATCH] Use braces to avoid a new warning in gcc 4.3. Also use Assert instead of AssertThrow in two places. git-svn-id: https://svn.dealii.org/trunk@14372 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/tridiagonal_matrix.h | 30 +++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/deal.II/lac/include/lac/tridiagonal_matrix.h b/deal.II/lac/include/lac/tridiagonal_matrix.h index 2f474746dd..82c7208d46 100644 --- a/deal.II/lac/include/lac/tridiagonal_matrix.h +++ b/deal.II/lac/include/lac/tridiagonal_matrix.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2005, 2006 by the deal.II authors +// Copyright (C) 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -406,13 +406,17 @@ TridiagonalMatrix::operator()(unsigned int i, unsigned int j) const if (j==i) return diagonal[i]; if (j==i-1) - if (is_symmetric) - return right[i-1]; - else - return left[i]; + { + if (is_symmetric) + return right[i-1]; + else + return left[i]; + } + if (j==i+1) return right[i]; - AssertThrow(false, ExcInternalError()); + + Assert (false, ExcInternalError()); return 0; } @@ -430,13 +434,17 @@ TridiagonalMatrix::operator()(unsigned int i, unsigned int j) if (j==i) return diagonal[i]; if (j==i-1) - if (is_symmetric) - return right[i-1]; - else - return left[i]; + { + if (is_symmetric) + return right[i-1]; + else + return left[i]; + } + if (j==i+1) return right[i]; - AssertThrow(false, ExcInternalError()); + + Assert (false, ExcInternalError()); return diagonal[0]; } -- 2.39.5