Browse Source

Added const to controllers reference.

merge-requests/365/head
eidheim 11 years ago
parent
commit
b7af345e84
  1. 2
      juci/source.cc
  2. 6
      juci/source.h

2
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<std::unique_ptr<Source::Controller> > &controllers) :
const std::vector<std::unique_ptr<Source::Controller> > &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);

6
juci/source.h

@ -96,7 +96,7 @@ namespace Source {
class Parser{
public:
Parser(std::vector<std::unique_ptr<Source::Controller> > &controllers):
Parser(const std::vector<std::unique_ptr<Source::Controller> > &controllers):
controllers(controllers) {}
// inits the syntax highligthing on file open
void InitSyntaxHighlighting(const std::string &filepath,
@ -128,13 +128,13 @@ namespace Source {
std::vector<Range> *source_ranges);
std::vector<std::string> get_compilation_commands();
//controllers is needed here, no way around that I think
std::vector<std::unique_ptr<Source::Controller> > &controllers;
const std::vector<std::unique_ptr<Source::Controller> > &controllers;
};
class Controller {
public:
Controller(const Source::Config &config,
std::vector<std::unique_ptr<Source::Controller> > &controllers);
const std::vector<std::unique_ptr<Source::Controller> > &controllers);
~Controller();
void OnNewEmptyFile();
void OnOpenFile(const std::string &filename);

Loading…
Cancel
Save