Cleanup similar issues in UniformGrid3D

MolOps.cpp: docs patch
This commit is contained in:
Greg Landrum
2007-05-16 08:14:44 +00:00
parent 78ea71bdbc
commit 8b3de2e02e
6 changed files with 34 additions and 11 deletions

View File

@@ -58,7 +58,7 @@ SparseBitVect::SparseBitVect(const char *data,const unsigned int dataLen)
bool
SparseBitVect::operator[](const unsigned int which) const
{
if(which < 0 || which >= d_size){
if(which >= d_size){
throw IndexErrorException(which);
}
if(dp_bits->count(which)) return true;
@@ -158,7 +158,7 @@ SparseBitVect::operator~ () const
bool
SparseBitVect::GetBit(const unsigned int which) const
{
if(which < 0 || which >= d_size){
if(which >= d_size){
throw IndexErrorException(which);
}
if(dp_bits->count(which)) return true;
@@ -214,7 +214,7 @@ SparseBitVect::SetBit(const unsigned int which)
throw ValueErrorException("BitVect not properly initialized.");
}
std::pair<IntSetIter,bool> res;
if(which < 0 || which >= d_size){
if(which >= d_size){
throw IndexErrorException(which);
}
res = dp_bits->insert(which);
@@ -256,7 +256,7 @@ SparseBitVect::UnSetBit(const unsigned int which)
if(!dp_bits){
throw ValueErrorException("BitVect not properly initialized.");
}
if(which < 0 || which >= d_size){
if(which >= d_size){
throw IndexErrorException(which);
}