[gjs] wrapperutils: Remove double null check on to_string
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] wrapperutils: Remove double null check on to_string
- Date: Sun, 9 Jun 2019 02:22:40 +0000 (UTC)
commit 79249ab87b8a01268719896293c36f8905565a05
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed May 29 00:25:03 2019 -0500
wrapperutils: Remove double null check on to_string
GJS_GET_WRAPPER_PRIV already does a priv null check, so no need to repeat it
inside GIWrapperBase::to_string()
gi/wrapperutils.h | 2 --
1 file changed, 2 deletions(-)
---
diff --git a/gi/wrapperutils.h b/gi/wrapperutils.h
index 5fa4ae2f..19f6a68b 100644
--- a/gi/wrapperutils.h
+++ b/gi/wrapperutils.h
@@ -546,8 +546,6 @@ class GIWrapperBase {
GJS_JSAPI_RETURN_CONVENTION
static bool to_string(JSContext* cx, unsigned argc, JS::Value* vp) {
GJS_GET_WRAPPER_PRIV(cx, argc, vp, args, obj, Base, priv);
- if (!priv)
- return false;
return gjs_wrapper_to_string_func(
cx, obj, static_cast<const Base*>(priv)->to_string_kind(),
priv->info(), priv->gtype(), priv->ptr_addr(), args.rval());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]