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



commit 7d3706cff518561f26926e8887c5565c30d7322e
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
    
    Just use the ! ("not") operator on the smart pointers 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..bd3651b4 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);
 
             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);
 
             interface_type = g_base_info_get_type(interface_info);
 
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index c0f42bca..942bf6ac 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);
 
     GjsAutoChar full_path = g_file_get_parse_name(file);
 


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