From cdc5f6ad5c79a175c959f0dfb1a27f55e53892c5 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Thu, 28 Jun 2018 16:51:12 +0000 Subject: [clangd] Use log10 instead of the natural logrithm for usage boost. llvm-svn: 335874 --- clang-tools-extra/clangd/Quality.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang-tools-extra/clangd/Quality.cpp') diff --git a/clang-tools-extra/clangd/Quality.cpp b/clang-tools-extra/clangd/Quality.cpp index 6a329fbe068..3e3103ff2e3 100644 --- a/clang-tools-extra/clangd/Quality.cpp +++ b/clang-tools-extra/clangd/Quality.cpp @@ -7,6 +7,7 @@ // //===---------------------------------------------------------------------===// #include "Quality.h" +#include #include "URI.h" #include "index/Index.h" #include "clang/AST/ASTContext.h" @@ -147,8 +148,8 @@ float SymbolQualitySignals::evaluate() const { // This avoids a sharp gradient for tail symbols, and also neatly avoids the // question of whether 0 references means a bad symbol or missing data. - if (References >= 3) - Score *= std::log(References); + if (References >= 10) + Score *= std::log10(References); if (Deprecated) Score *= 0.1f; -- cgit v1.2.3