From 33aa2b6bbbf6edbe2d0173a03a9869e7ed7a2660 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 29 Oct 2017 09:21:41 +0100 Subject: static constexpr -> constexpr --- api/plugin-support.hpp | 4 ++-- compat/check-visible.cpp | 4 ++-- cv/translation-calibrator.cpp | 2 +- filter-kalman/kalman.cpp | 4 ++-- migration/20160917_00-accela.cpp | 2 +- migration/20171020_00-max-pitch-output.cpp | 2 +- options/slider.cpp | 2 +- pose-widget/pose-widget.cpp | 6 +++--- proto-fsuipc/ftnoir_protocol_fsuipc.cpp | 2 +- proto-ft/ftnoir_protocol_ft.cpp | 2 +- proto-mouse/ftnoir_protocol_mouse.cpp | 2 +- proto-simconnect/ftnoir_protocol_sc.cpp | 2 +- spline/spline-widget.cpp | 8 ++++---- spline/spline.cpp | 2 +- tracker-aruco/ftnoir_tracker_aruco.cpp | 4 ++-- tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp | 2 +- tracker-hatire/thread.cpp | 4 ++-- tracker-hydra/ftnoir_tracker_hydra.cpp | 2 +- tracker-pt/camera.cpp | 2 +- tracker-pt/ftnoir_tracker_pt.cpp | 2 +- tracker-pt/ftnoir_tracker_pt_dialog.cpp | 6 +++--- tracker-pt/point_tracker.cpp | 8 ++++---- tracker-rift-025/ftnoir_tracker_rift_025.cpp | 6 +++--- tracker-rift-042/ftnoir_tracker_rift_042.cpp | 6 +++--- tracker-rift-080/ftnoir_tracker_rift_080.cpp | 6 +++--- tracker-rift-140/rift-140.cpp | 6 +++--- tracker-steamvr/steamvr.cpp | 6 +++--- tracker-tobii-eyex/tobii-eyex.cpp | 6 +++--- tracker-tobii-eyex/tobii-settings.cpp | 4 ++-- 29 files changed, 57 insertions(+), 57 deletions(-) diff --git a/api/plugin-support.hpp b/api/plugin-support.hpp index 9df11169..acba925c 100644 --- a/api/plugin-support.hpp +++ b/api/plugin-support.hpp @@ -155,8 +155,8 @@ private: if (in.startsWith(OPENTRACK_SOLIB_PREFIX) && in.endsWith("." OPENTRACK_SOLIB_EXT)) { - static constexpr unsigned pfx_len = sizeof(OPENTRACK_SOLIB_PREFIX) - 1; - static constexpr unsigned rst_len = sizeof("." OPENTRACK_SOLIB_EXT) - 1; + constexpr unsigned pfx_len = sizeof(OPENTRACK_SOLIB_PREFIX) - 1; + constexpr unsigned rst_len = sizeof("." OPENTRACK_SOLIB_EXT) - 1; in = in.mid(pfx_len); in = in.left(in.size() - rst_len); diff --git a/compat/check-visible.cpp b/compat/check-visible.cpp index d1d928fd..84ddd6d9 100644 --- a/compat/check-visible.cpp +++ b/compat/check-visible.cpp @@ -8,8 +8,8 @@ #include -static constexpr int visible_timeout = 5000; -static constexpr int invisible_timeout = 250; +constexpr int visible_timeout = 5000; +constexpr int invisible_timeout = 250; static Timer timer; static QMutex mtx; diff --git a/cv/translation-calibrator.cpp b/cv/translation-calibrator.cpp index fb465f3c..8d8494b2 100644 --- a/cv/translation-calibrator.cpp +++ b/cv/translation-calibrator.cpp @@ -81,7 +81,7 @@ std::tuple TranslationCalibrator::get_estimate() bool TranslationCalibrator::check_bucket(const cv::Matx33d& R_CM_k) { using namespace euler; - static constexpr double r2d = 180/M_PI; + constexpr double r2d = 180/M_PI; rmat r; for (unsigned j = 0; j < 3; j++) diff --git a/filter-kalman/kalman.cpp b/filter-kalman/kalman.cpp index 559f1ea5..744c732b 100644 --- a/filter-kalman/kalman.cpp +++ b/filter-kalman/kalman.cpp @@ -122,8 +122,8 @@ void kalman::fill_process_noise_cov_matrix(StateMatrix &target, double dt) const double sigma_angle = s.process_sigma_rot; double a_pos = sigma_pos * sigma_pos * dt; double a_ang = sigma_angle * sigma_angle * dt; - static constexpr double b = 20; - static constexpr double c = 1.; + constexpr double b = 20; + constexpr double c = 1.; for (int i = 0; i < 3; ++i) { target(i, i) = a_pos; diff --git a/migration/20160917_00-accela.cpp b/migration/20160917_00-accela.cpp index aa14484a..c5c6f579 100644 --- a/migration/20160917_00-accela.cpp +++ b/migration/20160917_00-accela.cpp @@ -29,7 +29,7 @@ struct move_accela_to_sliders : migration static constexpr const char* new_bundle_name = "accela-sliders"; static constexpr const char* slider_name = "rotation-nonlinearity"; - using map_ = struct { map s[8]; }; + struct map_ { map s[8]; }; static map_ make_settings(settings_accela& s) { diff --git a/migration/20171020_00-max-pitch-output.cpp b/migration/20171020_00-max-pitch-output.cpp index f084f7fb..0699ac48 100644 --- a/migration/20171020_00-max-pitch-output.cpp +++ b/migration/20171020_00-max-pitch-output.cpp @@ -33,7 +33,7 @@ struct max_pitch_output : migration bool should_run() const override { { - static constexpr char const* name = "pitch-max-output-value"; + constexpr char const* name = "pitch-max-output-value"; bundle b = make_bundle("opentrack-mappings"); diff --git a/options/slider.cpp b/options/slider.cpp index 147496cb..33000ee9 100644 --- a/options/slider.cpp +++ b/options/slider.cpp @@ -46,7 +46,7 @@ bool slider_value::operator==(const slider_value& v) const { using std::fabs; - static constexpr double eps = 2e-3; + constexpr double eps = 2e-3; #if 1 return (fabs(v.cur_ - cur_) < eps && diff --git a/pose-widget/pose-widget.cpp b/pose-widget/pose-widget.cpp index 3e5f4ec3..950d64d8 100644 --- a/pose-widget/pose-widget.cpp +++ b/pose-widget/pose-widget.cpp @@ -107,7 +107,7 @@ void pose_transform::with_rotate(F&& fun, double xAngle, double yAngle, double z using std::sin; using std::cos; - static constexpr double d2r = M_PI / 180; + constexpr double d2r = M_PI / 180; euler::euler_t euler(-zAngle * d2r, xAngle * d2r, -yAngle * d2r); euler::rmat r = euler::euler_to_rmat(euler); @@ -237,7 +237,7 @@ void pose_transform::project_quad_texture() vec2i min, max; { - static constexpr const double c = 85/100.; + constexpr double c = 85/100.; const int sx_ = (w - std::max(0, (w - h)/2)) * 5/9; const int sy_ = (h - std::max(0, (h - w)/2)) * 5/9; @@ -382,7 +382,7 @@ void pose_transform::project_quad_texture() #if defined BILINEAR_FILTER float a; { - static constexpr unsigned k = 3; + constexpr unsigned k = 3; const uc i = orig[orig_pos + k]; const uc i_ = orig[orig_pos_ + k]; const uc i__ = orig[orig_pos__ + k]; diff --git a/proto-fsuipc/ftnoir_protocol_fsuipc.cpp b/proto-fsuipc/ftnoir_protocol_fsuipc.cpp index 11d954ab..959408fe 100644 --- a/proto-fsuipc/ftnoir_protocol_fsuipc.cpp +++ b/proto-fsuipc/ftnoir_protocol_fsuipc.cpp @@ -51,7 +51,7 @@ int fsuipc::scale2AnalogLimits(t x, t min_x, t max_x) template static inline bool check_float_fresh(t x, t y) { - static constexpr t eps = t(1e-4); + constexpr t eps = t(1e-4); return std::fabs(x - y) >= eps; } diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp index 1e704c72..fbfc23d9 100644 --- a/proto-ft/ftnoir_protocol_ft.cpp +++ b/proto-ft/ftnoir_protocol_ft.cpp @@ -118,7 +118,7 @@ void freetrack::pose(const double* headpose) if (addr != addr_) assert(!"unaligned access"); - static_assert(sizeof(char[8])/sizeof(LONG) == 2, ""); + static_assert(sizeof(LONG) == 4, ""); for (unsigned k = 0; k < 2; k++) store(*(std::int32_t volatile*)&pMemData->table_ints[k], t.ints[k]); diff --git a/proto-mouse/ftnoir_protocol_mouse.cpp b/proto-mouse/ftnoir_protocol_mouse.cpp index 5e8a7bc1..d03c6c66 100644 --- a/proto-mouse/ftnoir_protocol_mouse.cpp +++ b/proto-mouse/ftnoir_protocol_mouse.cpp @@ -74,8 +74,8 @@ int mouse::get_delta(int val, int prev) int mouse::get_value(double val, double sensitivity, bool is_rotation) { - static constexpr double c = 1e-1; static constexpr double sgn[] = { 1e-2, 1 }; + constexpr double c = 1e-1; return iround(val * c * sensitivity * sgn[unsigned(is_rotation)]); } diff --git a/proto-simconnect/ftnoir_protocol_sc.cpp b/proto-simconnect/ftnoir_protocol_sc.cpp index cfe973a7..c37fa91c 100644 --- a/proto-simconnect/ftnoir_protocol_sc.cpp +++ b/proto-simconnect/ftnoir_protocol_sc.cpp @@ -68,7 +68,7 @@ void simconnect::run() { const int idle_seconds = tm.elapsed_seconds(); - static constexpr int max_idle_seconds = 2; + constexpr int max_idle_seconds = 2; if (idle_seconds >= max_idle_seconds) { diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp index 67751840..72f6370e 100644 --- a/spline/spline-widget.cpp +++ b/spline/spline-widget.cpp @@ -203,7 +203,7 @@ void spline_widget::drawFunction() //#define DEBUG_SPLINE #ifndef DEBUG_SPLINE - static constexpr double step_ = 5; + constexpr double step_ = 5; const double maxx = _config->max_input(); const double step = step_ / c.x(); @@ -563,8 +563,8 @@ void spline_widget::show_tooltip(const QPoint& pos, const QPointF& value_) bool spline_widget::is_in_bounds(const QPoint& pos) const { - static constexpr int grace = point_size * 3; - static constexpr int bottom_grace = int(point_size * 1.5); + constexpr int grace = point_size * 3; + constexpr int bottom_grace = int(point_size * 1.5); return (pos.x() + grace > pixel_bounds.left() && pos.x() - grace < pixel_bounds.right() && pos.y() + grace > pixel_bounds.top() && @@ -612,7 +612,7 @@ QPointF spline_widget::pixel_coord_to_point(const QPoint& point) qreal x = (point.x() - pixel_bounds.x()) / c.x(); qreal y = (pixel_bounds.height() - point.y() + pixel_bounds.y()) / c.y(); - static constexpr int c = 1000; + constexpr int c = 1000; if (snap_x > 0) { diff --git a/spline/spline.cpp b/spline/spline.cpp index e3cd2d6f..2d741474 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -471,7 +471,7 @@ std::shared_ptr spline::get_settings() const double spline::bucket_size_coefficient(const QList& points) const { - static constexpr double eps = 1e-4; + constexpr double eps = 1e-4; const double maxx = max_input(); diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index 2842a9c2..90531736 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -241,7 +241,7 @@ void aruco_tracker::set_points() using f = float; const f hx = f(s.headpos_x), hy = f(s.headpos_y), hz = f(s.headpos_z); - static constexpr float size = 40; + constexpr float size = 40; const int x1=1, x2=2, x3=3, x4=0; @@ -386,7 +386,7 @@ void aruco_tracker::run() #ifdef DEBUG_UNSHARP_MASKING { - static constexpr double strength = double(DEBUG_UNSHARP_MASKING); + constexpr double strength = double(DEBUG_UNSHARP_MASKING); cv::GaussianBlur(grayscale, blurred, cv::Size(0, 0), gauss_kernel_size); cv::addWeighted(grayscale, 1 + strength, blurred, -strength, 0, grayscale); cv::imshow("capture", grayscale); diff --git a/tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp b/tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp index 6985032c..d24b938c 100644 --- a/tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp +++ b/tracker-freepie-udp/ftnoir_tracker_freepie-udp.cpp @@ -88,7 +88,7 @@ void tracker_freepie::run() { QMutexLocker foo(&mtx); - static constexpr double r2d = 180 / M_PI; + constexpr double r2d = 180 / M_PI; for (int i = 0; i < 3; i++) { diff --git a/tracker-hatire/thread.cpp b/tracker-hatire/thread.cpp index 1f976c35..cb338c4a 100644 --- a/tracker-hatire/thread.cpp +++ b/tracker-hatire/thread.cpp @@ -323,8 +323,8 @@ void hatire_thread::on_serial_read() { // qt can fire QSerialPort::readyRead() needlessly, causing a busy loop. // see https://github.com/opentrack/opentrack/issues/327#issuecomment-207941003 - static constexpr int hz = 90; - static constexpr int ms = 1000/hz; + constexpr int hz = 90; + constexpr int ms = 1000/hz; portable::sleep(ms); } diff --git a/tracker-hydra/ftnoir_tracker_hydra.cpp b/tracker-hydra/ftnoir_tracker_hydra.cpp index 9c0d85f8..d1e2fb36 100644 --- a/tracker-hydra/ftnoir_tracker_hydra.cpp +++ b/tracker-hydra/ftnoir_tracker_hydra.cpp @@ -52,7 +52,7 @@ void Hydra_Tracker::data(double *data) data[TX] = double(acd.controllers[0].pos[0])/50; data[TY] = double(acd.controllers[0].pos[1])/50; data[TZ] = double(acd.controllers[0].pos[2])/50; - static constexpr double r2d = 180/M_PI; + constexpr double r2d = 180/M_PI; data[Yaw] = double(ypr[0]) * r2d; data[Pitch] = double(ypr[1]) * r2d; data[Roll] = double(ypr[2]) * r2d; diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp index 263d6617..e2bcc4b9 100644 --- a/tracker-pt/camera.cpp +++ b/tracker-pt/camera.cpp @@ -53,7 +53,7 @@ DEFUN_WARN_UNUSED Camera::result Camera::get_frame(cv::Mat& frame) t.start(); // measure fps of valid frames - static constexpr double RC = .1; // seconds + constexpr double RC = .1; // seconds const double alpha = dt/(dt + RC); if (dt_mean < dt_eps) diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index 7b573060..08ac9785 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -106,7 +106,7 @@ void Tracker_PT::run() vec3 p = X_GH.t; // head (center?) position in global space vec2 p_((p[0] * fx) / p[2], (p[1] * fx) / p[2]); // projected to screen - static constexpr int len = 9; + constexpr int len = 9; cv::Point p2(iround(p_[0] * preview_frame.cols + preview_frame.cols/2), iround(-p_[1] * preview_frame.cols + preview_frame.rows/2)); diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp index 9f0832ef..075b024d 100644 --- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp +++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp @@ -154,9 +154,9 @@ void TrackerDialog_PT::startstop_trans_calib(bool start) s.t_MH_y = int(tmp[1]); s.t_MH_z = int(tmp[2]); - static constexpr int min_yaw_samples = 15; - static constexpr int min_pitch_samples = 15; - static constexpr int min_samples = min_yaw_samples+min_pitch_samples; + constexpr int min_yaw_samples = 15; + constexpr int min_pitch_samples = 15; + constexpr int min_samples = min_yaw_samples+min_pitch_samples; // Don't bother counting roll samples. Roll calibration is hard enough // that it's a hidden unsupported feature anyway. diff --git a/tracker-pt/point_tracker.cpp b/tracker-pt/point_tracker.cpp index b87c38d1..ed57235d 100644 --- a/tracker-pt/point_tracker.cpp +++ b/tracker-pt/point_tracker.cpp @@ -99,7 +99,7 @@ PointTracker::PointOrder PointTracker::find_correspondences_previous(const vec2* p[2] = project(model.M02, fx); const int diagonal = int(std::sqrt(f(info.res_x*info.res_x + info.res_y*info.res_y))); - static constexpr int div = 100; + constexpr int div = 100; const int max_dist = diagonal / div; // 8 pixels for 640x480 // set correspondences by minimum distance to projected model point @@ -140,7 +140,7 @@ PointTracker::PointOrder PointTracker::find_correspondences_previous(const vec2* bool PointTracker::maybe_use_old_point_order(const PointOrder& order, const CamInfo& info) { - static constexpr f std_width = 640, std_height = 480; + constexpr f std_width = 640, std_height = 480; PointOrder scaled_order; @@ -163,7 +163,7 @@ bool PointTracker::maybe_use_old_point_order(const PointOrder& order, const CamI } // CAVEAT don't increase too much, it visibly loses precision - static constexpr f max_dist = f(.13); + constexpr f max_dist = f(.13); const bool validp = sum < max_dist; @@ -278,7 +278,7 @@ int PointTracker::POSIT(const PointModel& model, const PointOrder& order, f foca mat33 R_1, R_2; mat33* R_current = &R_1; - static constexpr int max_iter = 100; + constexpr int max_iter = 100; int i=1; for (; iGetOrientation(); - static constexpr float c_mult = 8; - static constexpr float c_div = 1/c_mult; + constexpr float c_mult = 8; + constexpr float c_div = 1/c_mult; Vector3f axis; float angle; @@ -115,7 +115,7 @@ void rift_tracker_025::data(double *data) old_yaw = yaw_; } - static constexpr double r2d = 180 / M_PI; + constexpr double r2d = 180 / M_PI; data[Yaw] = yaw_ * r2d; data[Pitch] = double(pitch) * r2d; diff --git a/tracker-rift-042/ftnoir_tracker_rift_042.cpp b/tracker-rift-042/ftnoir_tracker_rift_042.cpp index 1047957a..0e52812d 100644 --- a/tracker-rift-042/ftnoir_tracker_rift_042.cpp +++ b/tracker-rift-042/ftnoir_tracker_rift_042.cpp @@ -67,8 +67,8 @@ void rift_tracker_042::data(double *data) ovrTrackingState ss = ovrHmd_GetTrackingState(hmd, 0); if (ss.StatusFlags & ovrStatus_OrientationTracked) { - static constexpr float c_mult = 16; - static constexpr float c_div = 1/c_mult; + constexpr float c_mult = 16; + constexpr float c_div = 1/c_mult; Vector3f axis; float angle; @@ -90,7 +90,7 @@ void rift_tracker_042::data(double *data) yaw_ += s.constant_drift; old_yaw = yaw_; } - static constexpr double d2r = 180 / M_PI; + constexpr double d2r = 180 / M_PI; data[Yaw] = yaw_ * -d2r; data[Pitch] = double(pitch) * d2r; data[Roll] = double(roll) * d2r; diff --git a/tracker-rift-080/ftnoir_tracker_rift_080.cpp b/tracker-rift-080/ftnoir_tracker_rift_080.cpp index be18e90d..00f3d5b3 100644 --- a/tracker-rift-080/ftnoir_tracker_rift_080.cpp +++ b/tracker-rift-080/ftnoir_tracker_rift_080.cpp @@ -77,8 +77,8 @@ void rift_tracker_080::data(double *data) ovrTrackingState ss = ovr_GetTrackingState(hmd, 0, false); if (ss.StatusFlags & ovrStatus_OrientationTracked) { - static constexpr float c_mult = 16; - static constexpr float c_div = 1/c_mult; + constexpr float c_mult = 16; + constexpr float c_div = 1/c_mult; Vector3f axis; float angle; @@ -104,7 +104,7 @@ void rift_tracker_080::data(double *data) yaw_ += s.constant_drift; old_yaw = yaw_; } - static constexpr double d2r = 180 / M_PI; + constexpr double d2r = 180 / M_PI; data[Yaw] = yaw_ * -d2r; data[Pitch] = double(pitch) * d2r; data[Roll] = double(roll) * d2r; diff --git a/tracker-rift-140/rift-140.cpp b/tracker-rift-140/rift-140.cpp index 45bfcc97..ebcc7654 100644 --- a/tracker-rift-140/rift-140.cpp +++ b/tracker-rift-140/rift-140.cpp @@ -70,8 +70,8 @@ void rift_tracker_140::data(double *data) ovrTrackingState ss = ovr_GetTrackingState(hmd, 0, false); if (ss.StatusFlags & ovrStatus_OrientationTracked) { - static constexpr float c_mult = 8; - static constexpr float c_div = 1/c_mult; + constexpr float c_mult = 8; + constexpr float c_div = 1/c_mult; Vector3f axis; float angle; @@ -97,7 +97,7 @@ void rift_tracker_140::data(double *data) yaw_ += s.constant_drift; old_yaw = yaw_; } - static constexpr double d2r = 180 / M_PI; + constexpr double d2r = 180 / M_PI; data[Yaw] = yaw_ * -d2r; data[Pitch] = double(pitch) * d2r; data[Roll] = double(roll) * d2r; diff --git a/tracker-steamvr/steamvr.cpp b/tracker-steamvr/steamvr.cpp index 259145b9..d250197b 100644 --- a/tracker-steamvr/steamvr.cpp +++ b/tracker-steamvr/steamvr.cpp @@ -54,7 +54,7 @@ void device_list::fill_device_specs(QList& list) v->GetDeviceToAbsoluteTrackingPose(origin::TrackingUniverseSeated, 0, device_states, vr::k_unMaxTrackedDeviceCount); - static constexpr unsigned bufsiz = vr::k_unTrackingStringSize; + constexpr unsigned bufsiz = vr::k_unTrackingStringSize; static char str[bufsiz+1] {}; // vr_lock prevents reentrancy for (unsigned k = 0; k < vr::k_unMaxTrackedDeviceCount; k++) @@ -238,7 +238,7 @@ void steamvr::data(double* data) std::tie(ok, pose) = device_list::get_pose(device_index); if (ok) { - static constexpr int c = 10; + constexpr int c = 10; const auto& result = pose.mDeviceToAbsoluteTracking; @@ -248,7 +248,7 @@ void steamvr::data(double* data) matrix_to_euler(data[Yaw], data[Pitch], data[Roll], result); - static constexpr double r2d = 180 / M_PI; + constexpr double r2d = 180 / M_PI; data[Yaw] *= r2d; data[Pitch] *= r2d; data[Roll] *= r2d; } } diff --git a/tracker-tobii-eyex/tobii-eyex.cpp b/tracker-tobii-eyex/tobii-eyex.cpp index c0547c08..eb5aae42 100644 --- a/tracker-tobii-eyex/tobii-eyex.cpp +++ b/tracker-tobii-eyex/tobii-eyex.cpp @@ -279,9 +279,9 @@ void tobii_eyex_tracker::data(double* data) using std::fabs; - static constexpr double max_yaw = 45, max_pitch = 30; - static constexpr double c_yaw = 3; - static constexpr double c_pitch = c_yaw * max_pitch / max_yaw; + constexpr double max_yaw = 45, max_pitch = 30; + constexpr double c_yaw = 3; + constexpr double c_pitch = c_yaw * max_pitch / max_yaw; const double yaw_delta = gain(fabs(x_)) * signum(x_) * c_yaw * dt; const double pitch_delta = gain(fabs(y_)) * signum(y_) * c_pitch * dt; diff --git a/tracker-tobii-eyex/tobii-settings.cpp b/tracker-tobii-eyex/tobii-settings.cpp index c3129ec5..bc201be4 100644 --- a/tracker-tobii-eyex/tobii-settings.cpp +++ b/tracker-tobii-eyex/tobii-settings.cpp @@ -85,7 +85,7 @@ rel_settings::rel_settings() : } // there's an underflow in spline code, can't use 1e0 -static constexpr const double spline_max = 1e2; +constexpr double spline_max = 1e2; double rel_settings::gain(double value) { @@ -102,7 +102,7 @@ void rel_settings::make_spline_(part* functors, unsigned len) { part& fun = functors[k]; - static constexpr unsigned nparts = 7; + constexpr unsigned nparts = 7; for (unsigned i = 1; i <= nparts; i++) { -- cgit v1.2.3