From: Wolfgang Bangerth Date: Mon, 8 Oct 2007 15:21:12 +0000 (+0000) Subject: Avoid the use of general macro names in header files. Use something prefixed by DEAL_... X-Git-Tag: v8.0.0~9800 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95b236967ecce910ed973befe67bc68db0b12249;p=dealii.git Avoid the use of general macro names in header files. Use something prefixed by DEAL_II_ instead, and #undef it again as soon as we can. git-svn-id: https://svn.dealii.org/trunk@15271 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparse_matrix_ez.templates.h b/deal.II/lac/include/lac/sparse_matrix_ez.templates.h index 128aa29242..0a069ec10a 100644 --- a/deal.II/lac/include/lac/sparse_matrix_ez.templates.h +++ b/deal.II/lac/include/lac/sparse_matrix_ez.templates.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2002, 2003, 2004, 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 @@ -538,7 +538,9 @@ SparseMatrixEZ::block_write (std::ostream &out) const } -#define CHECKFOR(in,a,c) {in >> c; AssertThrow(c == a, ExcIO());} +#define DEAL_II_CHECK_INPUT(in,a,c) \ + {in >> c; AssertThrow(c == a, \ + ExcMessage("Unexpected character in input stream"));} template void @@ -549,39 +551,43 @@ SparseMatrixEZ::block_read (std::istream &in) char c; int n; // first read in simple data - CHECKFOR(in,'[',c); + DEAL_II_CHECK_INPUT(in,'[',c); in >> n; row_info.resize(n); - CHECKFOR(in,']',c); - CHECKFOR(in,'[',c); + DEAL_II_CHECK_INPUT(in,']',c); + DEAL_II_CHECK_INPUT(in,'[',c); in >> n_columns; - CHECKFOR(in,']',c); - CHECKFOR(in,'[',c); + DEAL_II_CHECK_INPUT(in,']',c); + DEAL_II_CHECK_INPUT(in,'[',c); in >> n; data.resize(n); - CHECKFOR(in,']',c); - CHECKFOR(in,'[',c); + DEAL_II_CHECK_INPUT(in,']',c); + DEAL_II_CHECK_INPUT(in,'[',c); in >> increment; - CHECKFOR(in,']',c); - CHECKFOR(in,'[',c); + DEAL_II_CHECK_INPUT(in,']',c); + DEAL_II_CHECK_INPUT(in,'[',c); // then read data in.read(reinterpret_cast(&row_info[0]), sizeof(RowInfo) * row_info.size()); - CHECKFOR(in,']',c); - CHECKFOR(in,'[',c); + DEAL_II_CHECK_INPUT(in,']',c); + DEAL_II_CHECK_INPUT(in,'[',c); in.read(reinterpret_cast(&data[0]), sizeof(Entry) * data.size()); - CHECKFOR(in,']',c); + DEAL_II_CHECK_INPUT(in,']',c); } +#undef DEAL_II_CHECK_INPUT + + + DEAL_II_NAMESPACE_CLOSE #endif // __deal2__sparse_matrix_ez_templates_h