message: Slight cleanup of update_unresolved()
diff: #include <realm/bplustree.hpp>
  #include <realm/array_key.hpp>
  -namespace realm {
  -
  -namespace _impl {
  +namespace realm::_impl {
  size_t virtual2real(const std::vector<size_t>& vec, size_t ndx) noexcept
  {
  @@ -27,11 +25,11 @@ size_t real2virtual(const std::vector<size_t>& vec, size_t ndx) noexcept
  void update_unresolved(std::vector<size_t>& vec, const BPlusTree<ObjKey>& tree)
  {
  vec.clear();
  - if (tree.is_attached()) {
  +
  // Only do the scan if context flag is set.
  - if (tree.get_context_flag()) {
  + if (tree.is_attached() && tree.get_context_flag()) {
  auto func = [&vec](BPlusTreeNode* node, size_t offset) {
  - auto leaf = static_cast<typename BPlusTree<ObjKey>::LeafNode*>(node);
  + auto leaf = static_cast<BPlusTree<ObjKey>::LeafNode*>(node);
  size_t sz = leaf->size();
  for (size_t i = 0; i < sz; i++) {
  auto k = leaf->get(i);
  @@ -47,6 +45,4 @@ void update_unresolved(std::vector<size_t>& vec, const BPlusTree<ObjKey>& tree)
  }
  }
  -} // namespace _impl
  -
  -} // namespace realm
  +} // namespace realm::_impl
  