diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-12 04:51:27 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2011-11-12 04:51:27 +0400 |
commit | dfb714296fcb6ee2bdde028a5c5bef430b9558aa (patch) | |
tree | 0ba8be0d16405633dd9208d8e232b6dc6d945e02 /mert/BleuScorer.h | |
parent | ce9a628ed0337d051ce7058dcace2fa53df6d884 (diff) |
Add 'explicit' for constructors with one argument.
Diffstat (limited to 'mert/BleuScorer.h')
-rw-r--r-- | mert/BleuScorer.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mert/BleuScorer.h b/mert/BleuScorer.h index 373325744..500910bb0 100644 --- a/mert/BleuScorer.h +++ b/mert/BleuScorer.h @@ -27,7 +27,7 @@ enum BleuReferenceLengthStrategy { BLEU_AVERAGE, BLEU_SHORTEST, BLEU_CLOSEST }; class BleuScorer: public StatisticsBasedScorer { public: - BleuScorer(const string& config = "") : StatisticsBasedScorer("BLEU",config),_refLengthStrategy(BLEU_CLOSEST) { + explicit BleuScorer(const string& config = "") : StatisticsBasedScorer("BLEU",config),_refLengthStrategy(BLEU_CLOSEST) { //configure regularisation static string KEY_REFLEN = "reflen"; static string REFLEN_AVERAGE = "average"; @@ -61,10 +61,11 @@ public: float calculateScore(const vector<int>& comps); private: - //no copy + // no copying allowed BleuScorer(const BleuScorer&); ~BleuScorer() {} BleuScorer& operator=(const BleuScorer&); + //Used to construct the ngram map struct CompareNgrams { int operator() (const vector<int>& a, const vector<int>& b) { |