Make InsertCompletion an aggregate

This commit is contained in:
Maxime Coste 2017-09-01 17:03:34 +07:00
parent 6d0016f89c
commit 44fb375c81

View File

@ -62,21 +62,12 @@ struct InsertCompletion
bool operator==(const Candidate& other) const { return completion == other.completion; } bool operator==(const Candidate& other) const { return completion == other.completion; }
bool operator<(const Candidate& other) const { return completion < other.completion; } bool operator<(const Candidate& other) const { return completion < other.completion; }
}; };
using CandidateList = Vector<Candidate, MemoryDomain::Completion>; using CandidateList = Vector<Candidate, MemoryDomain::Completion>;
CandidateList candidates; CandidateList candidates;
BufferCoord begin; BufferCoord begin;
BufferCoord end; BufferCoord end;
size_t timestamp; size_t timestamp = 0;
InsertCompletion() : timestamp{0} {}
InsertCompletion(CandidateList candidates,
BufferCoord begin, BufferCoord end,
size_t timestamp)
: candidates{std::move(candidates)}, begin{begin}, end{end},
timestamp{timestamp} {}
bool is_valid() const { return not candidates.empty(); } bool is_valid() const { return not candidates.empty(); }
}; };