1 From 262cf9657f9c2727a816972b348692adcc666008 Mon Sep 17 00:00:00 2001
2 From: Marcin Kolny <marcin.kolny@gmail.com>
3 Date: Fri, 1 Jul 2016 19:45:05 +0200
4 Subject: [PATCH] Use RefPtr::bool() operator in the conditions
6 Since bool() operator in RefPtr class is explicit,
7 comparision with integer doesn't compile.
9 src/persp/dbgperspective/nmv-dbg-perspective.cc | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
12 diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
13 index be652db5..ac207e49 100644
14 --- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
15 +++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
16 @@ -5672,7 +5672,7 @@ DBGPerspective::switch_to_asm (const common::DisassembleInfo &a_info,
17 a_source_editor->clear_decorations ();
19 Glib::RefPtr<Gsv::Buffer> asm_buf;
20 - if ((asm_buf = a_source_editor->get_assembly_source_buffer ()) == 0) {
21 + if (!(asm_buf = a_source_editor->get_assembly_source_buffer ())) {
22 SourceEditor::setup_buffer_mime_and_lang (asm_buf, "text/x-asm");
23 a_source_editor->register_assembly_source_buffer (asm_buf);
24 asm_buf = a_source_editor->get_assembly_source_buffer ();
25 @@ -5720,7 +5720,7 @@ DBGPerspective::switch_to_source_code ()
27 Glib::RefPtr<Gsv::Buffer> source_buf;
29 - if ((source_buf = source_editor->get_non_assembly_source_buffer ()) == 0) {
30 + if (!(source_buf = source_editor->get_non_assembly_source_buffer ())) {
32 // We don't have any source code buffer. Let's try hard to get
33 // the source code corresponding to the current frame. For that,