Skip to content

Commit

Permalink
Histories members -> poof!
Browse files Browse the repository at this point in the history
We however have Histories in constructor, which we will remove out of the way
soon.
  • Loading branch information
Jerin Philip committed Mar 31, 2021
1 parent 2a6b5b2 commit 63da9bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/translator/response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace bergamot {

Response::Response(AnnotatedText &&source, Histories &&histories,
std::vector<Ptr<Vocab const>> &vocabs)
: source(std::move(source)), histories_(std::move(histories)) {
: source(std::move(source)) {
// Reserving length at least as much as source_ seems like a reasonable thing
// to do to avoid reallocations.
target.text.reserve(source.text.size());
Expand Down
10 changes: 1 addition & 9 deletions src/translator/response.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ class Response {
Response(Response &&other)
: source(std::move(other.source)), target(std::move(other.target)),
alignments(std::move(other.alignments)),
qualityScores(std::move(other.qualityScores)),
histories_(std::move(other.histories_)){};
qualityScores(std::move(other.qualityScores)){};

// The following copy bans are not stricitly required anymore since Annotation
// is composed of the ByteRange primitive (which was previously string_view
Expand Down Expand Up @@ -87,13 +86,6 @@ class Response {
/// sparse matrix representation with indices corresponding
/// to (sub-)words accessible through Annotation.
std::vector<Alignment> alignments;

/// Access to histories, which holds rich information on translated text.
/// Not recommended to use, will be removed in future.
const Histories &histories() const { return histories_; }

private:
Histories histories_;
};
} // namespace bergamot
} // namespace marian
Expand Down

0 comments on commit 63da9bd

Please sign in to comment.