mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-04 21:54:27 +08:00
Fix and test sf.net bug 1719831 (http://sourceforge.net/tracker/index.php?func=detail&aid=1719831&group_id=160139&atid=814650)
Cleanup similar issues in UniformGrid3D MolOps.cpp: docs patch
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user