[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:42:13 +0000 (UTC)
commit 77c088997e0774b3c77e9136eda8c2b3af09b005
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 on our smart pointers and check that they are not 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]