From 4ff22e660394b5eb1ebde963c54c621fe98f70fb Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Sat, 26 Dec 2020 21:30:53 +0100 Subject: [PATCH] Making the progress an integer, as per the specification (#739) --- src/lsp.hh | 2 +- src/pipeline.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lsp.hh b/src/lsp.hh index 3c9bf1c2..e01d7497 100644 --- a/src/lsp.hh +++ b/src/lsp.hh @@ -223,7 +223,7 @@ struct WorkDoneProgress { const char *kind; std::optional title; std::optional message; - std::optional percentage; + std::optional percentage; }; struct WorkDoneProgressParam { const char *token; diff --git a/src/pipeline.cc b/src/pipeline.cc index 6f517b3f..0bd65fc8 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -729,7 +729,7 @@ void mainLoop() { (Twine(completed - last_idle) + "/" + Twine(enqueued - last_idle)) .str(); param.value.percentage = - 100.0 * (completed - last_idle) / (enqueued - last_idle); + 100 * (completed - last_idle) / (enqueued - last_idle); notify("$/progress", param); } else if (in_progress) { stats.last_idle.store(enqueued, std::memory_order_relaxed);