diff --git a/src/m_avrecorder.cpp b/src/m_avrecorder.cpp index bff239070..ca5cd73a4 100644 --- a/src/m_avrecorder.cpp +++ b/src/m_avrecorder.cpp @@ -91,14 +91,10 @@ static AVRecorder::Config configure() if (sound_started && cv_movie_sound.value) { - cfg.audio = { - .sample_rate = 44100, - }; + cfg.audio = { 44100 }; } - cfg.video = { - .frame_rate = cv_movie_fps.value, - }; + cfg.video = { cv_movie_fps.value }; AVRecorder::Config::Video& v = *cfg.video; diff --git a/src/math/fixed.hpp b/src/math/fixed.hpp index 0e5cae4c1..c39a0aba6 100644 --- a/src/math/fixed.hpp +++ b/src/math/fixed.hpp @@ -66,7 +66,7 @@ struct Fixed Fixed operator-() const { return -val_; } #define X(op) \ - template \ + template >> \ Fixed operator op(const T& b) const { return val_ op b; } \ Fixed operator op(const Fixed& b) const \ { \ diff --git a/src/p_sweep.cpp b/src/p_sweep.cpp index d4e9d22ef..c59aaa3b5 100644 --- a/src/p_sweep.cpp +++ b/src/p_sweep.cpp @@ -21,7 +21,7 @@ Result SlopeAABBvsLine::vs_slope(const line_segment& l) const LineEquation ql{l}; unit ls = copysign(kUnit, ql.m()); - auto hit = [&](const vec2& k, unit xr, unit x, const vec2& n) -> Contact + auto hit = [&, &a = a, &b = b](const vec2& k, unit xr, unit x, const vec2& n) -> Contact { std::optional k2; @@ -92,7 +92,7 @@ Result SlopeAABBvsLine::vs_slope(const line_segment& l) const // xrs.x = x radius // xrs.y = x sign - auto bind = [&](const vec2& k, const vec2& xrs, unit ns) -> std::optional + auto bind = [&, &a = a, &b = b](const vec2& k, const vec2& xrs, unit ns) -> std::optional { if (k.x < a.x) { @@ -206,7 +206,7 @@ Result VerticalAABBvsLine::vs_slope(const line_segment& l) const auto [a, b] = l.by_x(); // left, right LineEquation ql{l}; - auto hit = [&](const vec2& k, unit xr, unit y, const vec2& n) -> Contact + auto hit = [&, &a = a, &b = b](const vec2& k, unit xr, unit y, const vec2& n) -> Contact { std::optional k2;