diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-07-08 23:20:56 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-07-08 23:20:56 +0200 |
commit | 90940a774eab876c38d5cef981b4be5bae67a462 (patch) | |
tree | 2e60edc1719ffd53752a55a7f0444166965e90c5 /migration/migration.cpp | |
parent | e3292e1ddaa8d69eb320d2700fc582b4675cf8ce (diff) |
modernize only
Diffstat (limited to 'migration/migration.cpp')
-rw-r--r-- | migration/migration.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/migration/migration.cpp b/migration/migration.cpp index 569dff99..8e5fea5e 100644 --- a/migration/migration.cpp +++ b/migration/migration.cpp @@ -29,11 +29,11 @@ namespace detail { static std::vector<mptr> migration_list; static std::vector<mfun> migration_thunks; -void migrator::register_migration(mptr m) +void migrator::register_migration(mptr const& m) { const QString date = m->unique_date(); - for (mptr m2 : migration_list) + for (mptr const& m2 : migration_list) if (m2->unique_date() == date) std::abort(); @@ -77,7 +77,7 @@ void migrator::eval_thunks() mptr m = fun(); register_migration(m); } - if (migration_thunks.size()) + if (!migration_thunks.empty()) sort_migrations(); migration_thunks.clear(); } @@ -118,7 +118,7 @@ QString migrator::time_after_migrations() { const std::vector<mptr>& list = migrations(); - if (list.size() == 0u) + if (list.empty()) return QStringLiteral("19700101_00"); QString ret = list[list.size() - 1]->unique_date(); |