From 252e7b3414fb1985e58bd89df9382912525c5023 Mon Sep 17 00:00:00 2001 From: Gabriele Sales Date: Wed, 12 Jul 2017 16:59:04 +0000 Subject: [PATCH] Fixed implementation of fexists. g++ 6.2.0 (Ubuntu Yakkety) rejects the current implementation with the following message: ``` cannot convert 'std::ifstream {aka std::basic_ifstream}' to 'bool' in return ``` An explicit call to the `good()` method of `ifstream` takes care of the problem. --- src/common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.cpp b/src/common.cpp index 9d077bd..8c4bf44 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -192,7 +192,7 @@ void TrimRead(const string& input_nucs, bool fexists(const char *filename) { ifstream ifile(filename); - return ifile; + return ifile.good(); } bool valid_nucleotides_string(const string &str) {