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>2013-08-22 13:16:24 +0400
committerKenneth Heafield <github@kheafield.com>2013-08-22 13:16:24 +0400
commitc4dc57f8a3d04390cb4757894a6d596be43b7aa7 (patch)
tree99cf1bd184d680bcfa5173399c95a72b1b4eaf94 /moses/Phrase.h
parent6b5c1a09e4cd27bc8adc00094729efa7e1bbf1bf (diff)
swap
Diffstat (limited to 'moses/Phrase.h')
-rw-r--r--moses/Phrase.h7
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();