mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-10 22:36:01 +00:00
compilation fixes for node
This commit is contained in:
parent
3095840d67
commit
65d052280d
@ -261,7 +261,7 @@ void ListClass<T>::add_listener(ContextType ctx, ObjectType this_object, size_t
|
||||
|
||||
list->add_notification_callback([=](CollectionChangeSet change_set, std::exception_ptr exception) {
|
||||
ValueType arguments[2];
|
||||
arguments[0] = protected_this;
|
||||
arguments[0] = static_cast<ObjectType>(protected_this);
|
||||
arguments[1] = Value::from_undefined(protected_ctx);
|
||||
Function<T>::call(protected_ctx, protected_callback, protected_this, 2, arguments);
|
||||
});
|
||||
|
@ -272,7 +272,7 @@ void ResultsClass<T>::add_listener(ContextType ctx, ObjectType this_object, size
|
||||
|
||||
auto token = results->add_notification_callback([=](CollectionChangeSet change_set, std::exception_ptr exception) {
|
||||
ValueType arguments[2];
|
||||
arguments[0] = protected_this;
|
||||
arguments[0] = static_cast<ObjectType>(protected_this);
|
||||
arguments[1] = CollectionClass<T>::create_collection_change_set(protected_ctx, change_set);
|
||||
Function<T>::call(protected_ctx, protected_callback, protected_this, 2, arguments);
|
||||
});
|
||||
|
@ -50,6 +50,10 @@ class Protected {
|
||||
bool operator!=(const Protected<MemberType> &other) const {
|
||||
return m_value != other.m_value;
|
||||
}
|
||||
|
||||
struct Comparator {
|
||||
bool operator()(const Protected<MemberType>& a, const Protected<MemberType>& b) const { return a == b; }
|
||||
};
|
||||
};
|
||||
|
||||
} // node
|
||||
|
Loading…
x
Reference in New Issue
Block a user