mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-12 07:14:23 +00:00
Fix some typos in comments
This commit is contained in:
parent
b42bf25c99
commit
2bcf42904a
@ -34,7 +34,7 @@ NotificationToken::~NotificationToken()
|
|||||||
// atomically to ensure that there are no data races when the token is
|
// atomically to ensure that there are no data races when the token is
|
||||||
// destroyed after being modified on a different thread.
|
// destroyed after being modified on a different thread.
|
||||||
// This is needed despite the token not being thread-safe in general as
|
// This is needed despite the token not being thread-safe in general as
|
||||||
// users find it very surpringing for obj-c objects to care about what
|
// users find it very surprising for obj-c objects to care about what
|
||||||
// thread they are deallocated on.
|
// thread they are deallocated on.
|
||||||
if (auto notifier = m_notifier.exchange({})) {
|
if (auto notifier = m_notifier.exchange({})) {
|
||||||
notifier->remove_callback(m_token);
|
notifier->remove_callback(m_token);
|
||||||
|
@ -581,8 +581,8 @@ CollectionChangeBuilder CollectionChangeBuilder::calculate(std::vector<size_t> c
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Don't add rows which were modified to not match the query to `deletions`
|
// Don't add rows which were modified to not match the query to `deletions`
|
||||||
// immediately because the unsorted move logic needs to be able to distinuish
|
// immediately because the unsorted move logic needs to be able to
|
||||||
// them from rows which were outright deleted
|
// distinguish them from rows which were outright deleted
|
||||||
IndexSet removed;
|
IndexSet removed;
|
||||||
|
|
||||||
// Now that our old and new sets of rows are sorted by row index, we can
|
// Now that our old and new sets of rows are sorted by row index, we can
|
||||||
|
@ -288,8 +288,9 @@ bool CollectionNotifier::deliver(Realm& realm, SharedGroup& sg, std::exception_p
|
|||||||
bool should_call_callbacks = do_deliver(sg);
|
bool should_call_callbacks = do_deliver(sg);
|
||||||
m_changes_to_deliver = std::move(m_accumulated_changes);
|
m_changes_to_deliver = std::move(m_accumulated_changes);
|
||||||
|
|
||||||
// FIXME: ugh
|
|
||||||
// fixup modifications to be source rows rather than dest rows
|
// fixup modifications to be source rows rather than dest rows
|
||||||
|
// FIXME: the actual change calculations should be updated to just calculate
|
||||||
|
// the correct thing instead
|
||||||
m_changes_to_deliver.modifications.erase_at(m_changes_to_deliver.insertions);
|
m_changes_to_deliver.modifications.erase_at(m_changes_to_deliver.insertions);
|
||||||
m_changes_to_deliver.modifications.shift_for_insert_at(m_changes_to_deliver.deletions);
|
m_changes_to_deliver.modifications.shift_for_insert_at(m_changes_to_deliver.deletions);
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the list change info if there's multiple LinkViews for the same LinkList
|
// Copy the list change info if there are multiple LinkViews for the same LinkList
|
||||||
auto id = [](auto const& list) { return std::tie(list.table_ndx, list.col_ndx, list.row_ndx); };
|
auto id = [](auto const& list) { return std::tie(list.table_ndx, list.col_ndx, list.row_ndx); };
|
||||||
for (size_t i = 1; i < m_current->lists.size(); ++i) {
|
for (size_t i = 1; i < m_current->lists.size(); ++i) {
|
||||||
for (size_t j = i; j > 0; --j) {
|
for (size_t j = i; j > 0; --j) {
|
||||||
|
@ -335,7 +335,7 @@ public:
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Array KVO can only send a single kind of change at a time, so
|
// Array KVO can only send a single kind of change at a time, so
|
||||||
// if there's multiple just give up and send "Set"
|
// if there are multiple just give up and send "Set"
|
||||||
o->indices.set(0);
|
o->indices.set(0);
|
||||||
o->kind = ColumnInfo::Kind::SetAll;
|
o->kind = ColumnInfo::Kind::SetAll;
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ public:
|
|||||||
// Remove all indexes from the set
|
// Remove all indexes from the set
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
// An iterator over the indivual indices in the set rather than the ranges
|
// An iterator over the individual indices in the set rather than the ranges
|
||||||
class IndexIterator : public std::iterator<std::forward_iterator_tag, size_t> {
|
class IndexIterator : public std::iterator<std::forward_iterator_tag, size_t> {
|
||||||
public:
|
public:
|
||||||
IndexIterator(IndexSet::const_iterator it) : m_iterator(it) { }
|
IndexIterator(IndexSet::const_iterator it) : m_iterator(it) { }
|
||||||
|
@ -63,7 +63,7 @@ namespace realm {
|
|||||||
bool in_memory = false;
|
bool in_memory = false;
|
||||||
|
|
||||||
// The following are intended for internal/testing purposes and
|
// The following are intended for internal/testing purposes and
|
||||||
// should not be publically exposed in binding APIs
|
// should not be publicly exposed in binding APIs
|
||||||
|
|
||||||
// If false, always return a new Realm instance, and don't return
|
// If false, always return a new Realm instance, and don't return
|
||||||
// that Realm instance for other requests for a cached Realm. Useful
|
// that Realm instance for other requests for a cached Realm. Useful
|
||||||
|
Loading…
x
Reference in New Issue
Block a user