From 65c2e089ab263c83bff7d2e945b80c53f80b749b Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Thu, 4 Aug 2016 09:48:47 +0200 Subject: workaround changes in glibmm 2.49.x Glib::RefPtr defines the operator bool() as explicit which breaks comparisons like "some_ref_ptr == 0" or "... != 0". https://bugzilla.gnome.org/show_bug.cgi?id=769502 --- gtk2_ardour/ardour_ui.cc | 8 ++++---- gtk2_ardour/fft_graph.cc | 2 +- gtk2_ardour/startup.cc | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index d6671205a7..e9cf5b2041 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -5397,16 +5397,16 @@ ARDOUR_UI::setup_toplevel_window (Gtk::Window& window, const string& name, void* if (window_icons.empty()) { Glib::RefPtr icon; - if ((icon = ::get_icon (PROGRAM_NAME "-icon_16px")) != 0) { + if ((icon = ::get_icon (PROGRAM_NAME "-icon_16px"))) { window_icons.push_back (icon); } - if ((icon = ::get_icon (PROGRAM_NAME "-icon_22px")) != 0) { + if ((icon = ::get_icon (PROGRAM_NAME "-icon_22px"))) { window_icons.push_back (icon); } - if ((icon = ::get_icon (PROGRAM_NAME "-icon_32px")) != 0) { + if ((icon = ::get_icon (PROGRAM_NAME "-icon_32px"))) { window_icons.push_back (icon); } - if ((icon = ::get_icon (PROGRAM_NAME "-icon_48px")) != 0) { + if ((icon = ::get_icon (PROGRAM_NAME "-icon_48px"))) { window_icons.push_back (icon); } } diff --git a/gtk2_ardour/fft_graph.cc b/gtk2_ardour/fft_graph.cc index abed0c70d7..ec54acbaaa 100644 --- a/gtk2_ardour/fft_graph.cc +++ b/gtk2_ardour/fft_graph.cc @@ -312,7 +312,7 @@ FFTGraph::draw_scales (cairo_t* cr) cairo_line_to (cr, width - 3 , .5 + v_margin); // 5 cairo_stroke (cr); - if (layout == 0) { + if (! layout) { layout = create_pango_layout (""); layout->set_font_description (get_style ()->get_font ()); } diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc index 58c1cfc7ad..12f98916bf 100644 --- a/gtk2_ardour/startup.cc +++ b/gtk2_ardour/startup.cc @@ -80,23 +80,23 @@ ArdourStartup::ArdourStartup () set_position (WIN_POS_CENTER); set_border_width (12); - if ((icon_pixbuf = ::get_icon (PROGRAM_NAME "-icon_48px")) == 0) { + if (! (icon_pixbuf = ::get_icon (PROGRAM_NAME "-icon_48px"))) { throw failed_constructor(); } list > window_icons; Glib::RefPtr icon; - if ((icon = ::get_icon (PROGRAM_NAME "-icon_16px")) != 0) { + if ((icon = ::get_icon (PROGRAM_NAME "-icon_16px"))) { window_icons.push_back (icon); } - if ((icon = ::get_icon (PROGRAM_NAME "-icon_22px")) != 0) { + if ((icon = ::get_icon (PROGRAM_NAME "-icon_22px"))) { window_icons.push_back (icon); } - if ((icon = ::get_icon (PROGRAM_NAME "-icon_32px")) != 0) { + if ((icon = ::get_icon (PROGRAM_NAME "-icon_32px"))) { window_icons.push_back (icon); } - if ((icon = ::get_icon (PROGRAM_NAME "-icon_48px")) != 0) { + if ((icon = ::get_icon (PROGRAM_NAME "-icon_48px"))) { window_icons.push_back (icon); } if (!window_icons.empty ()) { -- cgit v1.2.3