]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid the use of general macro names in header files. Use something prefixed by DEAL_...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 8 Oct 2007 15:21:12 +0000 (15:21 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 8 Oct 2007 15:21:12 +0000 (15:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@15271 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_matrix_ez.templates.h

index 128aa2924262b9957c9cad6bca67dcc763af98ad..0a069ec10a702187da883734ca3d4a148dc40123 100644 (file)
@@ -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<number>::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 <typename number>
 void
@@ -549,39 +551,43 @@ SparseMatrixEZ<number>::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<char*>(&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<char*>(&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

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.