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>::
ConstBlock<SubVector, BStart>::operator[]
(
const direction i
const direction d
) const
{
#ifdef FULLDEBUG
if (i >= Ncmpts)
if (d >= Ncmpts)
{
FatalErrorInFunction
<< "index " << d << " out of range"
@ -251,7 +251,7 @@ ConstBlock<SubVector, BStart>::operator[]
}
#endif
return vs_[BStart + i];
return vs_[BStart + d];
}
@ -269,7 +269,7 @@ ConstBlock<SubVector, BStart>::operator()
if (i >= Ncmpts)
{
FatalErrorInFunction
<< "index " << d << " out of range"
<< "index " << i << " out of range"
<< abort(FatalError);
}