diff options
author | Kenneth Heafield <github@kheafield.com> | 2013-08-22 13:16:24 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2013-08-22 13:16:24 +0400 |
commit | c4dc57f8a3d04390cb4757894a6d596be43b7aa7 (patch) | |
tree | 99cf1bd184d680bcfa5173399c95a72b1b4eaf94 /moses/Phrase.h | |
parent | 6b5c1a09e4cd27bc8adc00094729efa7e1bbf1bf (diff) |
swap
Diffstat (limited to 'moses/Phrase.h')
-rw-r--r-- | moses/Phrase.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/moses/Phrase.h b/moses/Phrase.h index 209f92f9e..a913efc69 100644 --- a/moses/Phrase.h +++ b/moses/Phrase.h @@ -63,6 +63,13 @@ public: /** create phrase from vectors of words */ explicit Phrase(const std::vector< const Word* > &mergeWords); + /* This isn't a swap function because classes inherit from Phrase and might + * not override swap, which would be bad. + */ + void SwapWords(Phrase &other) { + swap(m_words, other.m_words); + } + /** destructor */ virtual ~Phrase(); |