pw_span: Switch from pw::span to std::span
Replace pw::span with std::span and "pw_span/span.h" with <span>
throughout the codebase.
Change-Id: Ib1fa873168b6093794e861611d750fcad6285d6c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12801
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
diff --git a/pw_kvs/entry_cache.cc b/pw_kvs/entry_cache.cc
index 599ae80..116f27f 100644
--- a/pw_kvs/entry_cache.cc
+++ b/pw_kvs/entry_cache.cc
@@ -44,7 +44,7 @@
// Remove the back entry of the address list.
addresses_.back() = kNoAddress;
- addresses_ = span(addresses_.begin(), addresses_.size() - 1);
+ addresses_ = std::span(addresses_.begin(), addresses_.size() - 1);
break;
}
}
@@ -123,7 +123,7 @@
// TODO(hepler): DCHECK(!full());
Address* first_address = ResetAddresses(descriptors_.size(), entry_address);
descriptors_.push_back(descriptor);
- return EntryMetadata(descriptors_.back(), span(first_address, 1));
+ return EntryMetadata(descriptors_.back(), std::span(first_address, 1));
}
// TODO: This method is the trigger of the O(valid_entries * all_entries) time
@@ -214,7 +214,8 @@
}
}
-span<EntryCache::Address> EntryCache::addresses(size_t descriptor_index) const {
+std::span<EntryCache::Address> EntryCache::addresses(
+ size_t descriptor_index) const {
Address* const addresses = first_address(descriptor_index);
size_t size = 0;
@@ -222,7 +223,7 @@
size += 1;
}
- return span(addresses, size);
+ return std::span(addresses, size);
}
EntryCache::Address* EntryCache::ResetAddresses(size_t descriptor_index,