BUG: VectorSpaceI.H - corrected invalid code

This commit is contained in:
Andrew Heather
2016-11-01 14:41:11 +00:00
parent c499de996b
commit 902f333b06

View File

@ -239,11 +239,11 @@ inline const Cmpt&
VectorSpace<Form, Cmpt, Ncmpts>:: VectorSpace<Form, Cmpt, Ncmpts>::
ConstBlock<SubVector, BStart>::operator[] ConstBlock<SubVector, BStart>::operator[]
( (
const direction i const direction d
) const ) const
{ {
#ifdef FULLDEBUG #ifdef FULLDEBUG
if (i >= Ncmpts) if (d >= Ncmpts)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "index " << d << " out of range" << "index " << d << " out of range"
@ -251,7 +251,7 @@ ConstBlock<SubVector, BStart>::operator[]
} }
#endif #endif
return vs_[BStart + i]; return vs_[BStart + d];
} }
@ -269,7 +269,7 @@ ConstBlock<SubVector, BStart>::operator()
if (i >= Ncmpts) if (i >= Ncmpts)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "index " << d << " out of range" << "index " << i << " out of range"
<< abort(FatalError); << abort(FatalError);
} }