[gjs/master.msvc: 2/4] gi/arg.cpp, gjs/importer.cpp: Avoid C++ ambiguity



commit 7bb599003120598e3aa05cb325c50e5472e51e9b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Feb 5 15:14:53 2020 +0800

    gi/arg.cpp, gjs/importer.cpp: Avoid C++ ambiguity
    
    Use the get() method for the smart pointers and check that against nullptr
    instead.

 gi/arg.cpp       | 4 ++--
 gjs/importer.cpp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index 3ccf731b..75164cae 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -2833,7 +2833,7 @@ gjs_value_from_g_argument (JSContext             *context,
 
             GjsAutoBaseInfo interface_info =
                 g_type_info_get_interface(type_info);
-            g_assert(interface_info != NULL);
+            g_assert(interface_info.get() != nullptr);
 
             interface_type = g_base_info_get_type(interface_info);
 
@@ -3231,7 +3231,7 @@ gjs_g_arg_release_internal(JSContext  *context,
 
             GjsAutoBaseInfo interface_info =
                 g_type_info_get_interface(type_info);
-            g_assert(interface_info != NULL);
+            g_assert(interface_info.get() != nullptr);
 
             interface_type = g_base_info_get_type(interface_info);
 
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index c0f42bca..a163ae14 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -345,7 +345,7 @@ import_module_init(JSContext       *context,
     }
 
     GjsAutoChar script = script_unowned;
-    g_assert(script != NULL);
+    g_assert(script.get() != nullptr);
 
     GjsAutoChar full_path = g_file_get_parse_name(file);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]