Fix some compiling warnings and errors in OS X
[ardour.git] / gtk2_ardour / plugin_eq_gui.cc
index bacfbe98b2386653d8b6b0552748120fda433334..a7e6b4261c44e7dd86ed363ab779d7304b452b39 100644 (file)
@@ -31,7 +31,7 @@
 #include <gtkmm/checkbutton.h>
 
 #include <iostream>
-
+#include <cmath>
 
 PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
        : _min_dB(-12.0),
@@ -231,9 +231,9 @@ PluginEqGui::set_buffer_size(uint32_t size, uint32_t signal_size)
                throw;
        }
 
-       if (tmp1) delete tmp1;
-       if (tmp2) delete tmp1;
-       if (tmp3) delete tmp1;
+       delete tmp1;
+       delete tmp2;
+       delete tmp3;
                
        _buffer_size = size;
        _signal_buffer_size = signal_size;
@@ -458,7 +458,7 @@ PluginEqGui::plot_impulse_phase(Gtk::Widget *w, cairo_t *cr)
        float avgY = 0.0;
        int avgNum = 0;
 
-       float width  = w->get_width();
+       // float width  = w->get_width();
        float height = w->get_height();
 
         cairo_set_source_rgba(cr, 0.95, 0.3, 0.2, 1.0);
@@ -508,7 +508,7 @@ PluginEqGui::draw_scales_power(Gtk::Widget *w, cairo_t *cr)
 
        cairo_font_extents_t extents;
        cairo_font_extents(cr, &extents);
-       float fontXOffset = extents.descent + 1.0;
+       // float fontXOffset = extents.descent + 1.0;
 
        char buf[256];
 
@@ -607,7 +607,7 @@ PluginEqGui::plot_impulse_amplitude(Gtk::Widget *w, cairo_t *cr)
        float avgY = 0.0;
        int avgNum = 0;
 
-       float width  = w->get_width();
+       // float width  = w->get_width();
        float height = w->get_height();
 
         cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
@@ -656,7 +656,7 @@ PluginEqGui::plot_signal_amplitude_difference(Gtk::Widget *w, cairo_t *cr)
        float avgY = 0.0;
        int avgNum = 0;
 
-       float width  = w->get_width();
+       // float width  = w->get_width();
        float height = w->get_height();
 
         cairo_set_source_rgb(cr, 0.0, 1.0, 0.0);
@@ -683,13 +683,13 @@ PluginEqGui::plot_signal_amplitude_difference(Gtk::Widget *w, cairo_t *cr)
                }
                */
 
-               if (isinf(power)) {
+               if (std::isinf(power)) {
                        if (power < 0) {
                                power = _min_dB - 1.0;
                        } else {
                                power = _max_dB - 1.0;
                        }
-               } else if (isnan(power)) {
+               } else if (std::isnan(power)) {
                        power = _min_dB - 1.0;
                }