Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2011-11-12 04:51:27 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2011-11-12 04:51:27 +0400
commitdfb714296fcb6ee2bdde028a5c5bef430b9558aa (patch)
tree0ba8be0d16405633dd9208d8e232b6dc6d945e02 /mert/BleuScorer.h
parentce9a628ed0337d051ce7058dcace2fa53df6d884 (diff)
Add 'explicit' for constructors with one argument.
Diffstat (limited to 'mert/BleuScorer.h')
-rw-r--r--mert/BleuScorer.h5
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) {