diff --git a/src/git.cc b/src/git.cc index 99d2174..6cc9743 100644 --- a/src/git.cc +++ b/src/git.cc @@ -1,5 +1,6 @@ #include "git.h" #include +#include bool Git::initialized=false; std::mutex Git::mutex; diff --git a/src/git.h b/src/git.h index 616e8b0..bc2506f 100644 --- a/src/git.h +++ b/src/git.h @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include diff --git a/src/source.cc b/src/source.cc index 51ac426..3d044e8 100644 --- a/src/source.cc +++ b/src/source.cc @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -111,8 +112,8 @@ std::string Source::FixIt::string(const Glib::RefPtr &buffer) { ////////////// //// View //// ////////////// -std::unordered_set Source::View::non_deleted_views; -std::unordered_set Source::View::views; +std::set Source::View::non_deleted_views; +std::set Source::View::views; Source::View::View(const boost::filesystem::path &file_path, const Glib::RefPtr &language, bool is_generic_view): BaseView(file_path, language), SpellCheckView(file_path, language), DiffView(file_path, language), parsed(true) { non_deleted_views.emplace(this); @@ -2740,8 +2741,8 @@ bool Source::View::on_motion_notify_event(GdkEventMotion *event) { } std::pair Source::View::find_tab_char_and_size() { - std::unordered_map tab_chars; - std::unordered_map tab_sizes; + std::map tab_chars; + std::map tab_sizes; auto iter=get_buffer()->begin(); long tab_count=-1; long last_tab_count=0; diff --git a/src/source.h b/src/source.h index 9e6b562..d4493ec 100644 --- a/src/source.h +++ b/src/source.h @@ -7,6 +7,7 @@ #include #include #include +#include #include namespace Source { @@ -50,8 +51,8 @@ namespace Source { class View : public SpellCheckView, public DiffView { public: - static std::unordered_set non_deleted_views; - static std::unordered_set views; + static std::set non_deleted_views; + static std::set views; View(const boost::filesystem::path &file_path, const Glib::RefPtr &language, bool is_generic_view=false); ~View() override; diff --git a/src/source_clang.cc b/src/source_clang.cc index 1bff414..76e17c4 100644 --- a/src/source_clang.cc +++ b/src/source_clang.cc @@ -216,8 +216,8 @@ void Source::ClangViewParse::soft_reparse(bool delayed) { }, delayed?1000:0); } -const std::unordered_map &Source::ClangViewParse::clang_types() { - static std::unordered_map types{ +const std::map &Source::ClangViewParse::clang_types() { + static std::map types{ {8, "def:function"}, {21, "def:function"}, {22, "def:identifier"}, diff --git a/src/source_clang.h b/src/source_clang.h index b4aaf80..180ec47 100644 --- a/src/source_clang.h +++ b/src/source_clang.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include #include #include #include "clangmm.h" @@ -43,7 +44,7 @@ namespace Source { private: Glib::ustring parse_thread_buffer; - static const std::unordered_map &clang_types(); + static const std::map &clang_types(); void update_syntax(); std::map> syntax_tags; diff --git a/src/source_language_protocol.h b/src/source_language_protocol.h index e5d5e1d..cfa35cd 100644 --- a/src/source_language_protocol.h +++ b/src/source_language_protocol.h @@ -6,8 +6,8 @@ #include #include #include -#include -#include +#include +#include namespace Source { class LanguageProtocolView; @@ -46,7 +46,7 @@ namespace LanguageProtocol { Capabilities capabilities; - std::unordered_set views; + std::set views; std::mutex views_mutex; std::mutex initialize_mutex; @@ -61,7 +61,7 @@ namespace LanguageProtocol { size_t message_id = 1; - std::unordered_map>> handlers; + std::map>> handlers; std::vector timeout_threads; std::mutex timeout_threads_mutex;