From 88dedfcbdbf99ed3b4c87dc47b2e2a5167881882 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 13 Oct 2016 23:41:49 +0200 Subject: fix math ambiguity & OSX compilation cc121.cc: In member function 'void ArdourSurface::CC121::encoder_handler(MIDI::Parser&, MIDI::EventTwoBytes*)': cc121.cc:413: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/include/architecture/i386/math.h:343: note: candidate 1: double pow(double, double) /usr/include/c++/4.2.1/cmath:357: note: candidate 2: float std::pow(float, float) --- libs/surfaces/cc121/cc121.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs') diff --git a/libs/surfaces/cc121/cc121.cc b/libs/surfaces/cc121/cc121.cc index 800605c9f7..241abb1518 100644 --- a/libs/surfaces/cc121/cc121.cc +++ b/libs/surfaces/cc121/cc121.cc @@ -410,8 +410,8 @@ CC121::encoder_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb) if (_current_stripable) { /* Get amount of change (encoder clicks) * (change per click)*/ /*Create an exponential curve*/ - float curve = sign * pow(adj, (1.0 + 10.0) / 10.0); - adj = curve * (31 / 1000.0); + float curve = sign * powf (adj, (1.f + 10.f) / 10.f); + adj = curve * (31.f / 1000.f); ardour_pan_azimuth (adj); } break; -- cgit v1.2.3