Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make compilable with C++17 or later #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Vocabulary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ void Vocabulary::save(cv::FileStorage &f,

}

void Vocabulary::toStream( std::ostream &out_str, bool compressed) const throw(std::exception){
void Vocabulary::toStream( std::ostream &out_str, bool compressed) const noexcept(false){

uint64_t sig=88877711233;//magic number describing the file
out_str.write((char*)&sig,sizeof(sig));
Expand Down Expand Up @@ -1257,7 +1257,7 @@ void Vocabulary::toStream( std::ostream &out_str, bool compressed) const throw(
}


void Vocabulary:: load_fromtxt(const std::string &filename)throw(std::runtime_error){
void Vocabulary:: load_fromtxt(const std::string &filename)noexcept(false){

std::ifstream ifile(filename);
if(!ifile)throw std::runtime_error("Vocabulary:: load_fromtxt Could not open file for reading:"+filename);
Expand Down Expand Up @@ -1332,7 +1332,7 @@ void Vocabulary:: load_fromtxt(const std::string &filename)throw(std::runtime_er
}
}
}
void Vocabulary::fromStream( std::istream &str ) throw(std::exception){
void Vocabulary::fromStream( std::istream &str ) noexcept(false){


m_words.clear();
Expand Down
6 changes: 3 additions & 3 deletions src/Vocabulary.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ friend class FastSearch;
*/
int getDescritorType()const;
//io to-from a stream
void toStream( std::ostream &str, bool compressed=true) const throw(std::exception);
void fromStream( std::istream &str ) throw(std::exception);
void toStream( std::ostream &str, bool compressed=true) const noexcept(false);
void fromStream( std::istream &str ) noexcept(false);

protected:

Expand Down Expand Up @@ -435,7 +435,7 @@ friend class FastSearch;

/**Loads from ORBSLAM txt files
*/
void load_fromtxt(const std::string &filename)throw(std::runtime_error);
void load_fromtxt(const std::string &filename)noexcept(false);

protected:

Expand Down