diff --git a/src/messages/text_document_definition.cc b/src/messages/text_document_definition.cc index 0fd0ab5a..ff9e8b24 100644 --- a/src/messages/text_document_definition.cc +++ b/src/messages/text_document_definition.cc @@ -139,7 +139,7 @@ struct TextDocumentDefinitionHandler // For symbols whose detailed names contain |query| as a substring, // we use the tuple to find the best match. - std::tuple best_score = {INT_MAX, true, 0}; + std::tuple best_score{INT_MAX, true, 0}; int best_i = -1; for (int i = 0; i < (int)db->symbols.size(); ++i) { if (db->symbols[i].kind == SymbolKind::Invalid) @@ -152,7 +152,7 @@ struct TextDocumentDefinitionHandler if (!use) continue; - std::tuple score = { + std::tuple score{ int(detailed_name.size() - query.size()), use->file != file_id, std::abs(use->range.start.line - position.line)}; if (score < best_score) {