Commit f8c838ff authored by Vedran Miletić's avatar Vedran Miletić

Fix compilation of executables and library

parent 9e6bbbed
......@@ -388,7 +388,7 @@ void NMSearch::InitGeneralSimplex(const RbtMatrix *plex)
void NMSearch::ReadSimplexFile(istream& fp)
{
if(fp == NULL) {
if(!fp) {
cerr<<"No Input Stream in ReadSimplexFile()!\n";
return; // There's no file handle!!
}
......
......@@ -68,7 +68,7 @@ class RbtAromIdxSF : public RbtBaseInterSF, public RbtBaseIdxSF, public RbtAnnot
//Generic scoring function params
struct f1prms {
RbtDouble R0,DRMin,DRMax,slope;
f1prms::f1prms(RbtDouble R, RbtDouble DMin, RbtDouble DMax)
f1prms(RbtDouble R, RbtDouble DMin, RbtDouble DMax)
: R0(R),DRMin(DMin),DRMax(DMax),slope(1.0/(DMax-DMin)) {};
};
......
......@@ -34,6 +34,7 @@ using std::set;
#include <algorithm>
//DM 9 Dec 1998 - add copy_if template to std namespace (not included in STL)
#if (defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 3) ) ) || (!defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) ) )
namespace std
{
template <class InputIterator, class OutputIterator, class Predicate>
......@@ -47,6 +48,7 @@ namespace std
return result;
}
}
#endif //(defined(__clang__) ...) || (!defined(__clang__) && defined(__GNUC__) ...)
// Container Typedefs
......
......@@ -78,7 +78,7 @@ class RbtPolarSF : public virtual RbtBaseSF, public virtual RbtAnnotationHandler
//Generic scoring function params
struct f1prms {
RbtDouble R0,DRMin,DRMax,slope;
f1prms::f1prms(RbtDouble R, RbtDouble DMin, RbtDouble DMax)
f1prms(RbtDouble R, RbtDouble DMin, RbtDouble DMax)
: R0(R),DRMin(DMin),DRMax(DMax),slope(1.0/(DMax-DMin)) {};
};
......
......@@ -61,9 +61,9 @@ int main(int argc,char* argv[])
try {
//Read the grid file header
#if defined(__sgi) && !defined(__GNUC__)
ifstream istr(strInputFile.c_str(),ios_base::in);
std::ifstream istr(strInputFile.c_str(),ios_base::in);
#else
ifstream istr(strInputFile.c_str(),ios_base::in|ios_base::binary);
std::ifstream istr(strInputFile.c_str(),ios_base::in|ios_base::binary);
#endif
if (istr) {
cout << strInputFile << " opened OK" << endl;
......@@ -111,7 +111,7 @@ int main(int argc,char* argv[])
//If we are not in listing mode, write the grid
if ((iGrid <= nGrids) && (iGrid >= 1)) {
cout << "Writing grid# " << iGrid << " to " << strOutputFile << "..." << endl;
ofstream ostr(strOutputFile.c_str());
std::ofstream ostr(strOutputFile.c_str());
spGrid->PrintInsightGrid(ostr);
ostr.close();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment