summaryrefslogtreecommitdiffhomepage
path: root/migration
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-06-22 12:54:47 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-06-26 23:01:53 +0200
commitf50ac3549d6a7f1199fa012e4b03f581bc8d305b (patch)
tree50ff044f1c618119c88544709808f533ed02225e /migration
parentd61eb905ae3fa161d50821d01ee47915713e89c2 (diff)
core, modules: modernize syntax only
Use more C++17 features where this helps any.
Diffstat (limited to 'migration')
-rw-r--r--migration/20171013_00-tracker-pt-threshold.cpp9
-rw-r--r--migration/migration.hpp2
2 files changed, 5 insertions, 6 deletions
diff --git a/migration/20171013_00-tracker-pt-threshold.cpp b/migration/20171013_00-tracker-pt-threshold.cpp
index aab64de7..c9c070fa 100644
--- a/migration/20171013_00-tracker-pt-threshold.cpp
+++ b/migration/20171013_00-tracker-pt-threshold.cpp
@@ -24,7 +24,6 @@ struct move_int_to_slider : migration
return "20171013_00";
}
-
QString name() const override
{
return "tracker/pt threshold slider (int -> slider_value)";
@@ -32,19 +31,19 @@ struct move_int_to_slider : migration
bool should_run() const override
{
- bundle b = make_bundle("tracker-pt");
+ bundle b = make_bundle(bundle_name);
return b->contains(old_name) && !b->contains(new_name);
}
void run() override
{
- bundle b = make_bundle("tracker-pt");
+ bundle b = make_bundle(bundle_name);
value<int> old_val(b, old_name, 128);
- value<slider_value> new_val(b, new_name, slider_value(128, 0, 255));
+ value<slider_value> new_val(b, new_name, { 128, 0, 255 });
- new_val = slider_value(old_val.to<int>(), 0, 255);
+ new_val = { old_val.to<int>(), 0, 255 };
b->save();
}
diff --git a/migration/migration.hpp b/migration/migration.hpp
index fc370a15..48689fc6 100644
--- a/migration/migration.hpp
+++ b/migration/migration.hpp
@@ -50,7 +50,7 @@ namespace detail {
{
registrator()
{
- mfun f { []() { return std::shared_ptr<migration>(new t); } };
+ mfun f { [] { return std::shared_ptr<migration>(new t); } };
migrator::add_migration_thunk(f);
}