From b683c863e36121448b7bee8269539aaf70fbaa6d Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Thu, 29 Jun 2017 23:18:53 -0700 Subject: [PATCH] Add enable_shared_from_this to CompletionSession --- src/clang_complete.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/clang_complete.h b/src/clang_complete.h index aef609f9..c185acf2 100644 --- a/src/clang_complete.h +++ b/src/clang_complete.h @@ -13,7 +13,7 @@ #include #include -struct CompletionSession { +struct CompletionSession : public std::enable_shared_from_this { Project::Entry file; WorkingFiles* working_files; clang::Index index; @@ -81,8 +81,8 @@ struct ClangCompleteManager { std::shared_ptr TryGetSession(const std::string& filename, bool create_if_needed); // TODO: make these configurable. - const int kMaxViewSessions = 3; - const int kMaxEditSessions = 10; + const int kMaxViewSessions = 1; + const int kMaxEditSessions = 1; // Global state. Config* config_;