From b7af345e84c2272d25dd9b9e36bb30c67076f79d Mon Sep 17 00:00:00 2001 From: eidheim Date: Wed, 17 Jun 2015 21:26:31 +0200 Subject: [PATCH] Added const to controllers reference. --- juci/source.cc | 2 +- juci/source.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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);