Skip to content

Commit

Permalink
Remove deprecated throw annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
kpu committed Sep 3, 2018
1 parent 65f4219 commit f7455d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lm/vocab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void ProbingVocabulary::LoadedBinary(bool have_words, int fd, EnumerateVocab *to
if (have_words) ReadWords(fd, to, bound_, offset);
}

void MissingUnknown(const Config &config) throw(SpecialWordMissingException) {
void MissingUnknown(const Config &config) {
switch(config.unknown_missing) {
case SILENT:
return;
Expand All @@ -294,7 +294,7 @@ void MissingUnknown(const Config &config) throw(SpecialWordMissingException) {
}
}

void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException) {
void MissingSentenceMarker(const Config &config, const char *str) {
switch (config.sentence_marker_missing) {
case SILENT:
return;
Expand Down
6 changes: 3 additions & 3 deletions lm/vocab.hh
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ class ProbingVocabulary : public base::Vocabulary {
detail::ProbingVocabularyHeader *header_;
};

void MissingUnknown(const Config &config) throw(SpecialWordMissingException);
void MissingSentenceMarker(const Config &config, const char *str) throw(SpecialWordMissingException);
void MissingUnknown(const Config &config);
void MissingSentenceMarker(const Config &config, const char *str);

template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) throw(SpecialWordMissingException) {
template <class Vocab> void CheckSpecials(const Config &config, const Vocab &vocab) {
if (!vocab.SawUnk()) MissingUnknown(config);
if (vocab.BeginSentence() == vocab.NotFound()) MissingSentenceMarker(config, "<s>");
if (vocab.EndSentence() == vocab.NotFound()) MissingSentenceMarker(config, "</s>");
Expand Down

0 comments on commit f7455d3

Please sign in to comment.