commit 9f82209e95cc9acea771d01c63f74128e9518c50 Author: Hubert Figuière Date: Sun Oct 30 22:51:46 2016 -0400 Various fixes for gcc 6: * src/dbgengine/nmv-dbg-common.h: explicit bool cast * src/persp/dbgperspective/nmv-dbg-perspective.cc: check Glib::RefPtr<> against false instead of 0. diff --git a/src/dbgengine/nmv-dbg-common.h b/src/dbgengine/nmv-dbg-common.h index ad3cc00..41074b0 100644 --- a/src/dbgengine/nmv-dbg-common.h +++ b/src/dbgengine/nmv-dbg-common.h @@ -171,7 +171,7 @@ public: bool has_slot () const { - return m_slot; + return static_cast(m_slot); } template diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc index be652db..ac207e4 100644 --- a/src/persp/dbgperspective/nmv-dbg-perspective.cc +++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc @@ -5672,7 +5672,7 @@ DBGPerspective::switch_to_asm (const common::DisassembleInfo &a_info, a_source_editor->clear_decorations (); Glib::RefPtr asm_buf; - if ((asm_buf = a_source_editor->get_assembly_source_buffer ()) == 0) { + if (!(asm_buf = a_source_editor->get_assembly_source_buffer ())) { SourceEditor::setup_buffer_mime_and_lang (asm_buf, "text/x-asm"); a_source_editor->register_assembly_source_buffer (asm_buf); asm_buf = a_source_editor->get_assembly_source_buffer (); @@ -5720,7 +5720,7 @@ DBGPerspective::switch_to_source_code () Glib::RefPtr source_buf; UString source_path; - if ((source_buf = source_editor->get_non_assembly_source_buffer ()) == 0) { + if (!(source_buf = source_editor->get_non_assembly_source_buffer ())) { // Woops! // We don't have any source code buffer. Let's try hard to get // the source code corresponding to the current frame. For that,