ptformat: Update the lib to 9d0b64f (upstream ptformat)
[ardour.git] / libs / surfaces / push2 / scale.cc
index 424a480ed2b380c9e827158bd51cc7e3b811850c..ac77c4ca324c81cc9a794efbf7d1e0391d75ef0e 100644 (file)
 #include "push2.h"
 #include "scale.h"
 
+#ifdef __APPLE__
+#define Rect ArdourCanvas::Rect
+#endif
+
 using namespace ARDOUR;
 using namespace std;
 using namespace PBD;
@@ -48,7 +52,7 @@ ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name)
 
        /* background */
 
-       bg = new Rectangle (this);
+       bg = new ArdourCanvas::Rectangle (this);
        bg->set (Rect (0, 0, display_width(), display_height()));
        bg->set_fill_color (p2.get_color (Push2::DarkBackground));
 
@@ -180,7 +184,7 @@ ScaleLayout::button_upper (uint32_t n)
                return;
        }
 
-       int root;
+       int root = 0;
 
        switch (n) {
        case 1:
@@ -223,7 +227,7 @@ ScaleLayout::button_lower (uint32_t n)
                return;
        }
 
-       int root;
+       int root = 0;
 
        switch (n) {
        case 1:
@@ -456,9 +460,9 @@ ScaleLayout::show_root_state ()
        Pango::FontDescription fd ("Sans 10");
 
        uint32_t highlight_text = 0;
-       vector<Text*>* none_text_array;
-       vector<Text*>* one_text_array;
-       Push2::ButtonID bid;
+       vector<Text*>* none_text_array = 0;
+       vector<Text*>* one_text_array = 0;
+       Push2::ButtonID bid = Push2::Upper2; /* keep compilers quiet */
 
        switch (p2.scale_root()) {
        case 0:
@@ -533,6 +537,8 @@ ScaleLayout::show_root_state ()
                one_text_array = &upper_text;
                bid = Push2::Upper7;
                break;
+       default:
+               return;
        }
 
        if (none_text_array) {