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:
authorKenneth Heafield <github@kheafield.com>2012-10-18 19:35:42 +0400
committerKenneth Heafield <github@kheafield.com>2012-10-18 19:35:42 +0400
commit8e23e441c3f630619a77c08944dc5f47a2ac1845 (patch)
tree846242a81cd6d8cbe9cd928e880fcf9f8306b6b9 /OnDiskPt
parent30c3175d141ccb97163baa27f62e46e815974922 (diff)
Fix virtual destructors
Diffstat (limited to 'OnDiskPt')
-rw-r--r--OnDiskPt/Phrase.h2
-rw-r--r--OnDiskPt/Word.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/OnDiskPt/Phrase.h b/OnDiskPt/Phrase.h
index e785be823..a2f049afe 100644
--- a/OnDiskPt/Phrase.h
+++ b/OnDiskPt/Phrase.h
@@ -41,6 +41,8 @@ public:
Phrase()
{}
+ virtual ~Phrase() {}
+
void AddWord(WordPtr word);
void AddWord(WordPtr word, size_t pos);
diff --git a/OnDiskPt/Word.h b/OnDiskPt/Word.h
index 8c65cf7e5..11ea16383 100644
--- a/OnDiskPt/Word.h
+++ b/OnDiskPt/Word.h
@@ -41,7 +41,7 @@ class Word
{
friend std::ostream& operator<<(std::ostream&, const Word&);
-protected:
+private:
bool m_isNonTerminal;
UINT64 m_vocabId;
@@ -76,7 +76,7 @@ public:
const Vocab &vocab,
Moses::Word &overwrite) const;
- virtual void DebugPrint(std::ostream &out, const Vocab &vocab) const;
+ void DebugPrint(std::ostream &out, const Vocab &vocab) const;
int Compare(const Word &compare) const;
bool operator<(const Word &compare) const;