From: wolf Date: Thu, 26 Sep 2002 16:13:48 +0000 (+0000) Subject: Undo Ralfs patch. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7996a0ab51b5e12084969f7499e24dec07b4f32;p=dealii-svn.git Undo Ralfs patch. git-svn-id: https://svn.dealii.org/trunk@6531 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/table.h b/deal.II/base/include/base/table.h index 268c11f568..b6bd7c7259 100644 --- a/deal.II/base/include/base/table.h +++ b/deal.II/base/include/base/table.h @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -399,7 +398,7 @@ namespace TableBaseAccessors * no reason not to make these * elements constant. */ - SmartPointer table; + const TableType &table; const pointer data; }; @@ -503,7 +502,7 @@ namespace TableBaseAccessors * no reason not to make these * elements constant. */ - SmartPointer table; + const TableType &table; const pointer data; }; }; @@ -1623,7 +1622,7 @@ namespace TableBaseAccessors Accessor::Accessor (const TableType &table, const pointer data) : - table (&table), + table (table), data (data) {}; @@ -1634,24 +1633,24 @@ namespace TableBaseAccessors Accessor Accessor::operator [] (const unsigned int i) const { - Assert (i < table->size()[N-P], - ExcIndexRange (i, 0, table->size()[N-P])); + Assert (i < table.size()[N-P], + ExcIndexRange (i, 0, table.size()[N-P])); // access i-th // subobject. optimize on the // case i==0 if (i==0) - return Accessor (*table, data); + return Accessor (table, data); else { // note: P>1, otherwise the // specialization would have // been taken! - unsigned int subobject_size = table->size()[N-1]; + unsigned int subobject_size = table.size()[N-1]; for (int p=P-1; p>1; --p) - subobject_size *= table->size()[N-p]; + subobject_size *= table.size()[N-p]; const pointer new_data = data + i*subobject_size; - return Accessor (*table, new_data); + return Accessor (table, new_data); }; }; @@ -1662,7 +1661,7 @@ namespace TableBaseAccessors Accessor::Accessor (const TableType &table, const pointer data) : - table (&table), + table (table), data (data) {}; @@ -1673,8 +1672,8 @@ namespace TableBaseAccessors typename Accessor::reference Accessor::operator [] (const unsigned int i) const { - Assert (i < table->size()[N-1], - ExcIndexRange (i, 0, table->size()[N-1])); + Assert (i < table.size()[N-1], + ExcIndexRange (i, 0, table.size()[N-1])); return data[i]; }; @@ -1685,7 +1684,7 @@ namespace TableBaseAccessors unsigned int Accessor::size () const { - return table->size()[N-1]; + return table.size()[N-1]; }; @@ -1705,7 +1704,7 @@ namespace TableBaseAccessors typename Accessor::iterator Accessor::end () const { - return data+table->size()[N-1]; + return data+table.size()[N-1]; }; };