diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-24 18:09:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-27 16:42:59 +0200 |
commit | fcafbe06947bf24f9c9ac2811dcbd123a672a380 (patch) | |
tree | eec1b46e6ab4c261a59300001b51a8fbdf115a17 /logic/mappings.hpp | |
parent | 17c2d20f7e9036351abf9f86bc09636e0b8a0559 (diff) |
logic: use c++14-style in-line initializers
Diffstat (limited to 'logic/mappings.hpp')
-rw-r--r-- | logic/mappings.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/logic/mappings.hpp b/logic/mappings.hpp index 4b71e9c5..834e969e 100644 --- a/logic/mappings.hpp +++ b/logic/mappings.hpp @@ -30,7 +30,17 @@ class OTR_LOGIC_EXPORT Mappings final private: Map axes[6]; public: - Mappings(std::vector<axis_opts*> opts); + template<typename t> + Mappings(t& opts) : + axes { + { "spline-X", "alt-spline-X", *opts[TX] }, + { "spline-Y", "alt-spline-Y", *opts[TY] }, + { "spline-Z", "alt-spline-Z", *opts[TZ] }, + { "spline-yaw", "alt-spline-yaw", *opts[Yaw] }, + { "spline-pitch", "alt-spline-pitch", *opts[Pitch] }, + { "spline-roll", "alt-spline-roll", *opts[Roll] } + } + {} Map& operator()(int i) { return axes[i]; } const Map& operator()(int i) const { return axes[i]; } |