diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-01 10:49:33 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-01 10:49:33 +0400 |
commit | cac1e14d5002df3a72c92421cb7f1803fde92e67 (patch) | |
tree | 314b29033a414d69c885f75ad77e466796cb32d3 /mert | |
parent | 8341d68a2b1c8446dcc0114ea5a3319660b21baa (diff) |
Add 'virtual' keyword for functions in OptimizationTask.
Adding 'virtual' keyword for an inherited virtual function is good
practice because it will let the users know where the function
comes from.
Diffstat (limited to 'mert')
-rwxr-xr-x | mert/mert.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mert/mert.cpp b/mert/mert.cpp index f79607b40..2721d9788 100755 --- a/mert/mert.cpp +++ b/mert/mert.cpp @@ -39,19 +39,19 @@ class OptimizationTask : public Moses::Task { ~OptimizationTask() {} - void resetOptimizer() { - if (m_optimizer) { - delete m_optimizer; - m_optimizer = NULL; - } + virtual void Run() { + m_score = m_optimizer->Run(m_point); } - bool DeleteAfterExecution() { + virtual bool DeleteAfterExecution() { return false; } - void Run() { - m_score = m_optimizer->Run(m_point); + void resetOptimizer() { + if (m_optimizer) { + delete m_optimizer; + m_optimizer = NULL; + } } statscore_t getScore() const { |