mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Remove some compiler warnings and problems found with msvc-8
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// $Id$
|
||||
//
|
||||
// Copyright (C) 2003-2006 Greg Landrum and Rational Discovery LLC
|
||||
// Copyright (C) 2003-2008 Greg Landrum and Rational Discovery LLC
|
||||
//
|
||||
// @@ All Rights Reserved @@
|
||||
//
|
||||
@@ -119,11 +119,15 @@ namespace RDKit{
|
||||
}
|
||||
|
||||
// remove bonds attached to the atom
|
||||
std::vector<std::pair<unsigned int,unsigned int> > nbrs;
|
||||
ADJ_ITER b1,b2;
|
||||
boost::tie(b1,b2)=getAtomNeighbors(oatom);
|
||||
while(b1!=b2){
|
||||
removeBond(oatom->getIdx(),*b1);
|
||||
b1++;
|
||||
nbrs.push_back(std::make_pair(oatom->getIdx(),*b1));
|
||||
++b1;
|
||||
}
|
||||
for(unsigned int i=0;i<nbrs.size();++i){
|
||||
removeBond(nbrs[i].first,nbrs[i].second);
|
||||
}
|
||||
|
||||
// loop over all atoms with higher indices and update their indices
|
||||
|
||||
@@ -82,7 +82,8 @@ namespace RankAtoms{
|
||||
if(elem<2.-tol){
|
||||
accum *= valVect[j];
|
||||
} else {
|
||||
accum *= pow(valVect[j],static_cast<int>(elem));
|
||||
accum *= pow(static_cast<double>(valVect[j]),
|
||||
static_cast<int>(elem));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,8 +148,7 @@ namespace RankAtoms {
|
||||
#endif
|
||||
|
||||
INT_VECT idxVect;
|
||||
idxVect.reserve(indicesInPlay.size());
|
||||
std::copy(indicesInPlay.begin(),indicesInPlay.end(),idxVect.begin());
|
||||
idxVect.assign(indicesInPlay.begin(),indicesInPlay.end());
|
||||
|
||||
// -------------
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (C) 2004-2006 Rational Discovery LLC
|
||||
// Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC
|
||||
//
|
||||
// @@ All Rights Reserved @@
|
||||
//
|
||||
@@ -13,8 +13,6 @@
|
||||
#include <iomanip>
|
||||
#include <cstdlib>
|
||||
#include <boost/random.hpp>
|
||||
#include <memory.h>
|
||||
#include <time.h>
|
||||
#include <boost/smart_ptr.hpp>
|
||||
|
||||
namespace RDNumeric {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// $Id$
|
||||
//
|
||||
// Copyright (C) 2001-2006 Randal M. Henne and Rational Discovery LLC
|
||||
// Copyright (C) 2001-2008 Greg Landrum, Randal M. Henne, and Rational Discovery LLC
|
||||
//
|
||||
// @@ All Rights Reserved @@
|
||||
//
|
||||
@@ -8,8 +8,8 @@
|
||||
#include "Invariant.h"
|
||||
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
namespace Invar {
|
||||
|
||||
@@ -22,10 +22,7 @@ namespace Invar {
|
||||
std::string& Invariant::
|
||||
toString()
|
||||
{
|
||||
char
|
||||
line[10];
|
||||
|
||||
sprintf( line, "%d", this->getLine() );
|
||||
std::string line=boost::lexical_cast<std::string>(this->getLine());
|
||||
|
||||
stringRep_d += "\n" + this->getMessage() + "\nViolation occurred on line "
|
||||
+ line + " in file " + this->getFile() + "\nFailed Expression: "
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (C) 2001-2006 Randal M. Henne and Rational Discovery LLC
|
||||
// Copyright (C) 2001-2008 Greg Landrum, Randal M. Henne and Rational Discovery LLC
|
||||
//
|
||||
// @@ All Rights Reserved @@
|
||||
//
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <RDGeneral/RDLog.h>
|
||||
@@ -129,8 +128,9 @@ namespace Invar {
|
||||
BOOST_LOG(rdErrorLog) << "\n\n****\n" << inv << "****\n\n"; throw inv;
|
||||
|
||||
#define RANGE_CHECK( lo, x, hi ) if ( (lo)>(hi) || (x)<(lo) || (x)>(hi) ) {\
|
||||
char expr[80]; sprintf( expr, "%lf <= %lf <= %lf", double(lo), double(x), double( hi ) );\
|
||||
Invar::Invariant inv( "Range Error", #x, expr, __FILE__, __LINE__ );\
|
||||
std::stringstream errstr;\
|
||||
errstr << lo << " <= " << x <<" <= "<<hi;\
|
||||
Invar::Invariant inv( "Range Error", #x, errstr.str().c_str(), __FILE__, __LINE__ );\
|
||||
BOOST_LOG(rdErrorLog) << "\n\n****\n" << inv << "****\n\n"; throw inv; }
|
||||
|
||||
#define TEST_ASSERT( expr ) if ( !(expr) ) {\
|
||||
|
||||
Reference in New Issue
Block a user