summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/common/optionsSource.cpp4
-rw-r--r--project2/files/optionsSource.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/project2/common/optionsSource.cpp b/project2/common/optionsSource.cpp
index 56e983c..0112ad4 100644
--- a/project2/common/optionsSource.cpp
+++ b/project2/common/optionsSource.cpp
@@ -26,7 +26,7 @@ boost::posix_time::ptime OptionsSource::loadedTime = boost::posix_time::special_
void
OptionsSource::loadSources(const Options::CurrentPlatform & platform)
{
- const auto & configs = AdHoc::PluginManager::getDefault()->getAll<OptionsSource>();
+ auto configs = AdHoc::PluginManager::getDefault()->getAll<OptionsSource>();
if (std::find_if(configs.begin(), configs.end(), [](boost::shared_ptr<const AdHoc::PluginOf<OptionsSource>> c) { return c->implementation()->modifiedTime() > loadedTime; }) != configs.end()) {
for (auto opts : AdHoc::PluginManager::getDefault()->getAll<Options>()) {
opts->implementation()->reset();
@@ -39,6 +39,8 @@ OptionsSource::loadSources(const Options::CurrentPlatform & platform)
if (loadedConfigs.find(c->implementation()) == loadedConfigs.end()) {
c->implementation()->loadInto(dcc, platform);
loadedConfigs.insert(c->implementation());
+ configs = AdHoc::PluginManager::getDefault()->getAll<OptionsSource>();
+ break;
}
}
}
diff --git a/project2/files/optionsSource.cpp b/project2/files/optionsSource.cpp
index 2ce320c..f8d752d 100644
--- a/project2/files/optionsSource.cpp
+++ b/project2/files/optionsSource.cpp
@@ -29,7 +29,7 @@ boost::posix_time::ptime
FileOptions::modifiedTime() const
{
return boost::posix_time::from_time_t(
- boost::filesystem::exists(file) ?
+ boost::filesystem::exists(file) ?
std::max(
boost::filesystem::last_write_time(file),
boost::filesystem::last_write_time(file.parent_path())) :