diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-22 12:54:47 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 23:01:53 +0200 |
commit | f50ac3549d6a7f1199fa012e4b03f581bc8d305b (patch) | |
tree | 50ff044f1c618119c88544709808f533ed02225e /migration/20171013_00-tracker-pt-threshold.cpp | |
parent | d61eb905ae3fa161d50821d01ee47915713e89c2 (diff) |
core, modules: modernize syntax only
Use more C++17 features where this helps any.
Diffstat (limited to 'migration/20171013_00-tracker-pt-threshold.cpp')
-rw-r--r-- | migration/20171013_00-tracker-pt-threshold.cpp | 9 |
1 files changed, 4 insertions, 5 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(); } |