diff --git a/juci/source.cc b/juci/source.cc index 2cd7bf5..647483a 100644 --- a/juci/source.cc +++ b/juci/source.cc @@ -258,7 +258,7 @@ HighlightToken(clang::Token *token, // Source::Controller::Controller() // Constructor for Controller Source::Controller::Controller(const Source::Config &config, - std::vector > &controllers) : + const std::vector > &controllers) : config(config), parser(controllers), parse_thread_go(false), parse_thread_mapped(false) { INFO("Source Controller with childs constructed"); view.signal_key_press_event().connect(sigc::mem_fun(*this, &Source::Controller::OnKeyPress), false); diff --git a/juci/source.h b/juci/source.h index b64b509..83816d6 100644 --- a/juci/source.h +++ b/juci/source.h @@ -96,7 +96,7 @@ namespace Source { class Parser{ public: - Parser(std::vector > &controllers): + Parser(const std::vector > &controllers): controllers(controllers) {} // inits the syntax highligthing on file open void InitSyntaxHighlighting(const std::string &filepath, @@ -128,13 +128,13 @@ namespace Source { std::vector *source_ranges); std::vector get_compilation_commands(); //controllers is needed here, no way around that I think - std::vector > &controllers; + const std::vector > &controllers; }; class Controller { public: Controller(const Source::Config &config, - std::vector > &controllers); + const std::vector > &controllers); ~Controller(); void OnNewEmptyFile(); void OnOpenFile(const std::string &filename);