[gjs/master.msvc: 1/3] gi/arg.cpp, gjs/importer.cpp: Avoid C++ ambiguity
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/master.msvc: 1/3] gi/arg.cpp, gjs/importer.cpp: Avoid C++ ambiguity
- Date: Thu, 6 Feb 2020 02:45:37 +0000 (UTC)
commit 2ca6c832c805650a28bba64df633f2abba238ec0
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 operator bool on our smart pointers
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..b41cd3ea 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..372cdfc6 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]