From 7328d138e334ce489c79e94011b76b2ce84108dc Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Wed, 14 Jun 2017 20:12:52 -0700 Subject: [PATCH] Fix linker error on clang (issue #2) --- src/indexer.cc | 2 ++ src/indexer.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/indexer.cc b/src/indexer.cc index 1683a55b..7cc19b04 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -257,6 +257,8 @@ std::string GetDocumentContentInRange(CXTranslationUnit cx_tu, CXSourceRange ran +// static +int IndexFile::kCurrentVersion = 4; IndexFile::IndexFile(const std::string& path) : id_cache(path), path(path) { // TODO: Reconsider if we should still be reusing the same id_cache. diff --git a/src/indexer.h b/src/indexer.h index 235dd887..58342d1e 100644 --- a/src/indexer.h +++ b/src/indexer.h @@ -455,7 +455,7 @@ MAKE_REFLECT_STRUCT(IndexInclude, line, resolved_path); struct IndexFile { IdCache id_cache; - static constexpr int kCurrentVersion = 4; + static int kCurrentVersion; int version = 0; std::string path;