diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-02-27 20:29:53 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-02-27 20:29:53 +0000 |
| commit | e5e705e151e589f13c905a54339c7245c300379e (patch) | |
| tree | a0b49f00f2cbcb834ce63d5ac40a6018b95a1641 /src/insert_completer.hh | |
| parent | 72bea292f8ff25436fd288d8ca86176cc6eb7505 (diff) | |
Fix clang warnings about uninitialized timestamp field
Closes #1241
Diffstat (limited to 'src/insert_completer.hh')
| -rw-r--r-- | src/insert_completer.hh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/insert_completer.hh b/src/insert_completer.hh index bb3a6caf..dac3db27 100644 --- a/src/insert_completer.hh +++ b/src/insert_completer.hh @@ -64,11 +64,19 @@ struct InsertCompletion using CandidateList = Vector<Candidate, MemoryDomain::Completion>; + CandidateList candidates; BufferCoord begin; BufferCoord end; - CandidateList candidates; 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} {} + bool is_valid() const { return not candidates.empty(); } }; |
