From d1f7a10614ca301564be0213e2d4981a88727191 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sat, 19 May 2018 12:45:50 +0200 Subject: [PATCH] Removed virtual calls during construction (found through clang-analyzer-optin.cplusplus.VirtualCall) --- src/notebook.cc | 1 + src/source_clang.cc | 1 - src/source_diff.cc | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/notebook.cc b/src/notebook.cc index b2327b1..77e8f0f 100644 --- a/src/notebook.cc +++ b/src/notebook.cc @@ -154,6 +154,7 @@ void Notebook::open(const boost::filesystem::path &file_path_, size_t notebook_i source_views.emplace_back(new Source::GenericView(file_path, language)); auto source_view=source_views.back(); + source_view->configure(); source_view->scroll_to_cursor_delayed=[this](Source::BaseView* view, bool center, bool show_tooltips) { while(Gtk::Main::events_pending()) diff --git a/src/source_clang.cc b/src/source_clang.cc index affe581..4a596ef 100644 --- a/src/source_clang.cc +++ b/src/source_clang.cc @@ -26,7 +26,6 @@ Source::ClangViewParse::ClangViewParse(const boost::filesystem::path &file_path, get_buffer()->create_tag(item.second); } } - configure(); if(get_buffer()->size()==0 && (language->get_id()=="chdr" || language->get_id()=="cpphdr")) { disable_spellcheck=true; diff --git a/src/source_diff.cc b/src/source_diff.cc index 2ed28dc..a012b27 100644 --- a/src/source_diff.cc +++ b/src/source_diff.cc @@ -45,8 +45,6 @@ Source::DiffView::DiffView(const boost::filesystem::path &file_path, Glib::RefPt renderer->tag_removed=get_buffer()->create_tag("git_removed"); renderer->tag_removed_below=get_buffer()->create_tag(); renderer->tag_removed_above=get_buffer()->create_tag(); - - configure(); } Source::DiffView::~DiffView() {