compilation fixes for node

This commit is contained in:
Ari Lazier 2016-07-08 16:48:48 -07:00
parent 3095840d67
commit 65d052280d
3 changed files with 6 additions and 2 deletions

View File

@ -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);
});

View File

@ -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);
});

View File

@ -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