[gjs: 4/13] boxed: Remove unused argument
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 4/13] boxed: Remove unused argument
- Date: Wed, 8 May 2019 13:44:23 +0000 (UTC)
commit 846913d79dd613fe47cb0685fc0d9b9f8e8b69bf
Author: Philip Chimento <philip chimento gmail com>
Date: Sat Mar 30 16:59:37 2019 -0700
boxed: Remove unused argument
BoxedInstance::init_from_props() does not need the obj parameter from
the constructor.
gi/boxed.cpp | 5 ++---
gi/boxed.h | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 2e02c867..531c5e5d 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -189,8 +189,7 @@ GIFieldInfo* BoxedPrototype::lookup_field(JSContext* cx, JSString* prop_name) {
* properties to set as fieds of the object. We don't require that every field
* of the object be set.
*/
-bool BoxedInstance::init_from_props(JSContext* context, JSObject* obj,
- JS::Value props_value) {
+bool BoxedInstance::init_from_props(JSContext* context, JS::Value props_value) {
size_t ix, length;
if (!props_value.isObject()) {
@@ -389,7 +388,7 @@ bool BoxedInstance::constructor_impl(JSContext* context, JS::HandleObject obj,
return false;
}
- return init_from_props(context, obj, args[0]);
+ return init_from_props(context, args[0]);
}
BoxedInstance::~BoxedInstance() {
diff --git a/gi/boxed.h b/gi/boxed.h
index 3b74f9ee..0b4a253e 100644
--- a/gi/boxed.h
+++ b/gi/boxed.h
@@ -185,7 +185,7 @@ class BoxedInstance
// Helper methods
GJS_JSAPI_RETURN_CONVENTION
- bool init_from_props(JSContext* cx, JSObject* obj, JS::Value props_value);
+ bool init_from_props(JSContext* cx, JS::Value props_value);
GJS_JSAPI_RETURN_CONVENTION
bool get_nested_interface_object(JSContext* cx, JSObject* parent_obj,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]