diff options
author | Marius Kintel <marius@kintel.net> | 2013-06-06 02:25:58 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-06-06 02:25:58 (GMT) |
commit | 626047f26d86079fe392bbd54d6e88a05cce85ef (patch) | |
tree | 2abe3d9bcb59c2c3dcbb4562d62015cc8ffed5b7 /src/mainwin.cc | |
parent | f49ba90cb51874671d8106ed89caeb0e9d6f3ae1 (diff) |
Minor refactoring of include checks
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r-- | src/mainwin.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc index db161d7..7099053 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -1044,16 +1044,6 @@ bool MainWindow::fileChangedOnDisk() return false; } -bool MainWindow::includesChanged() -{ - if (this->root_module) { - BOOST_FOREACH(const FileModule::IncludeContainer::value_type &item, this->root_module->includes) { - if (this->root_module->include_modified(item.second)) return true; - } - } - return false; -} - /*! If reload is true, does a timestamp check on the document and tries to reload it. Otherwise, just reparses the current document and any dependencies, updates the @@ -1065,7 +1055,9 @@ bool MainWindow::compileTopLevelDocument(bool reload) { bool shouldcompiletoplevel = !reload; - if (includesChanged()) shouldcompiletoplevel = true; + if (this->root_module && this->root_module->includesChanged()) { + shouldcompiletoplevel = true; + } if (reload) { // Refresh files if it has changed on disk |