diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-25 16:37:59 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-25 16:37:59 +0300 |
commit | 97b2aa5663e97079145fb494bf97e1b2997b4161 (patch) | |
tree | f8a68fa4ea40bb99c21cd26e7f02a27ddcc48187 /search | |
parent | 84b1c4b4c0c02362cdb35b55e08196d03b993baf (diff) |
WordsRange -> Range
Diffstat (limited to 'search')
-rw-r--r-- | search/applied.hh | 2 | ||||
-rw-r--r-- | search/header.hh | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/search/applied.hh b/search/applied.hh index 9464080cc..f404cccbc 100644 --- a/search/applied.hh +++ b/search/applied.hh @@ -24,7 +24,7 @@ template <class Below> class GenericApplied : public Header { *child_out = Below(part->End()); } - GenericApplied(void *location, Score score, Arity arity, Note note, Moses::WordsRange range) : Header(location, arity) { + GenericApplied(void *location, Score score, Arity arity, Note note, Moses::Range range) : Header(location, arity) { SetScore(score); SetNote(note); SetRange(range); diff --git a/search/header.hh b/search/header.hh index 699d8ef15..980507516 100644 --- a/search/header.hh +++ b/search/header.hh @@ -1,10 +1,10 @@ #ifndef SEARCH_HEADER__ #define SEARCH_HEADER__ -// Header consisting of Score, Arity, Note and WordsRange +// Header consisting of Score, Arity, Note and Range #include "search/types.hh" -#include "moses/WordsRange.h" +#include "moses/Range.h" #include <stdint.h> @@ -39,11 +39,11 @@ class Header { *reinterpret_cast<Note*>(base_ + sizeof(Score) + sizeof(Arity)) = to; } - Moses::WordsRange GetRange() const { - return *reinterpret_cast<const Moses::WordsRange*>(base_ + sizeof(Score) + sizeof(Arity) + sizeof(Note)); + Moses::Range GetRange() const { + return *reinterpret_cast<const Moses::Range*>(base_ + sizeof(Score) + sizeof(Arity) + sizeof(Note)); } - void SetRange(Moses::WordsRange to) { - *reinterpret_cast<Moses::WordsRange*>(base_ + sizeof(Score) + sizeof(Arity) + sizeof(Note)) = to; + void SetRange(Moses::Range to) { + *reinterpret_cast<Moses::Range*>(base_ + sizeof(Score) + sizeof(Arity) + sizeof(Note)) = to; } uint8_t *Base() { return base_; } @@ -58,7 +58,7 @@ class Header { *reinterpret_cast<Arity*>(base_ + sizeof(Score)) = arity; } - static const std::size_t kHeaderSize = sizeof(Score) + sizeof(Arity) + sizeof(Note) + sizeof(Moses::WordsRange); + static const std::size_t kHeaderSize = sizeof(Score) + sizeof(Arity) + sizeof(Note) + sizeof(Moses::Range); uint8_t *After() { return base_ + kHeaderSize; } const uint8_t *After() const { return base_ + kHeaderSize; } |