diff --git a/napi-inl.h b/napi-inl.h index be20dc085..e7ddce7f6 100644 --- a/napi-inl.h +++ b/napi-inl.h @@ -1315,7 +1315,7 @@ inline bool Object::Delete(uint32_t index) { return result; } -inline Array Object::GetPropertyNames() const { +inline Array Object::GetPropertyNames() { napi_value result; napi_status status = napi_get_property_names(_env, _value, &result); NAPI_THROW_IF_FAILED(_env, status, Array()); @@ -1345,7 +1345,7 @@ inline bool Object::DefineProperties( return true; } -inline bool Object::InstanceOf(const Function& constructor) const { +inline bool Object::InstanceOf(const Function& constructor) { bool result; napi_status status = napi_instanceof(_env, _value, constructor, &result); NAPI_THROW_IF_FAILED(_env, status, false); diff --git a/napi.h b/napi.h index 8be2ca3f7..702c3ce52 100644 --- a/napi.h +++ b/napi.h @@ -738,7 +738,7 @@ namespace Napi { uint32_t index ///< Property / element index ); - Array GetPropertyNames() const; ///< Get all property names + Array GetPropertyNames(); ///< Get all property names /// Defines a property on the object. bool DefineProperty( @@ -761,9 +761,8 @@ namespace Napi { /// Checks if an object is an instance created by a constructor function. /// /// This is equivalent to the JavaScript `instanceof` operator. - bool InstanceOf( - const Function& constructor ///< Constructor function - ) const; + bool InstanceOf(const Function& constructor ///< Constructor function + ); template inline void AddFinalizer(Finalizer finalizeCallback, T* data);