Skip to content

Commit

Permalink
ofstream and ifstream comptability with old compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrepeterlongo committed Aug 28, 2020
1 parent e8ac118 commit f786ce1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/SRC_counter/src/SRC_counter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void SRC_counter::parse_query_sequences (){


void SRC_counter::load_quasi_dictionary(std::string dumped_file_name){
std::ifstream is = std::ifstream(dumped_file_name, std::ios_base::binary);
std::ifstream is(dumped_file_name, std::ios_base::binary);
is.read(reinterpret_cast<char*>(&this->kmer_size), sizeof(this->kmer_size));
quasiDico = quasidictionaryKeyGeneric <IteratorKmerH5Wrapper, unsigned char >();
quasiDico.load(is);
Expand All @@ -296,7 +296,7 @@ void SRC_counter::load_quasi_dictionary(std::string dumped_file_name){


void SRC_counter::write_quasi_dictionary(std::string dumped_file_name){
std::ofstream os = std::ofstream(dumped_file_name, std::ios_base::binary);
std::ofstream os(dumped_file_name, std::ios_base::binary);
os.write(reinterpret_cast<char const*>(&this->kmer_size), sizeof(this->kmer_size));
quasiDico.save(os);
}
Expand Down
4 changes: 2 additions & 2 deletions tools/SRC_linker/src/SRC_linker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void SRC_linker::parse_query_sequences (){
}

void SRC_linker::load_quasi_dictionary(std::string dumped_file_name){
std::ifstream is = std::ifstream(dumped_file_name, std::ios_base::binary);
std::ifstream is(dumped_file_name, std::ios_base::binary);
is.read(reinterpret_cast<char*>(&this->kmer_size), sizeof(this->kmer_size));
quasiDico = quasidictionaryVectorKeyGeneric<IteratorKmerH5Wrapper, u_int32_t>();
quasiDico.load(is);
Expand All @@ -417,7 +417,7 @@ void SRC_linker::load_quasi_dictionary(std::string dumped_file_name){


void SRC_linker::write_quasi_dictionary(std::string dumped_file_name){
std::ofstream os = std::ofstream(dumped_file_name, std::ios_base::binary);
std::ofstream os(dumped_file_name, std::ios_base::binary);
os.write(reinterpret_cast<char const*>(&this->kmer_size), sizeof(this->kmer_size));
quasiDico.save(os);
}
Expand Down

0 comments on commit f786ce1

Please sign in to comment.