From 44fb375c819b38364be69dd7309ad8c47160335b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 1 Sep 2017 17:03:34 +0700 Subject: [PATCH] Make InsertCompletion an aggregate --- src/insert_completer.hh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/insert_completer.hh b/src/insert_completer.hh index 22ba643a..be65cc0b 100644 --- a/src/insert_completer.hh +++ b/src/insert_completer.hh @@ -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; } }; - using CandidateList = Vector; CandidateList candidates; BufferCoord begin; BufferCoord end; - size_t timestamp; - - InsertCompletion() : timestamp{0} {} - - InsertCompletion(CandidateList candidates, - BufferCoord begin, BufferCoord end, - size_t timestamp) - : candidates{std::move(candidates)}, begin{begin}, end{end}, - timestamp{timestamp} {} + size_t timestamp = 0; bool is_valid() const { return not candidates.empty(); } };