summaryrefslogtreecommitdiff
path: root/libs/surfaces
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-10-13 23:41:49 +0200
committerRobin Gareus <robin@gareus.org>2016-10-13 23:41:49 +0200
commit88dedfcbdbf99ed3b4c87dc47b2e2a5167881882 (patch)
tree5b58ae443f79ded4fee0a582914dbf5fe1cd5931 /libs/surfaces
parent8f9a9523d2161ee15975f5f9136ef80d4bfbf3e2 (diff)
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)
Diffstat (limited to 'libs/surfaces')
-rw-r--r--libs/surfaces/cc121/cc121.cc4
1 files changed, 2 insertions, 2 deletions
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;