pw_kvs: Fix shadowing, increase kMaxUsableSectors
Two arguments in the KeyDescriptor shadow class members, potentially
causing compilations with -Werror=shadow enabled.
Also increase default maximum usable sectors to 256.
Change-Id: I96b060c3bd2c97c3b182d4b1cc74558f51382044
diff --git a/pw_kvs/public/pw_kvs/key_value_store.h b/pw_kvs/public/pw_kvs/key_value_store.h
index d8798fc..aa220be 100644
--- a/pw_kvs/public/pw_kvs/key_value_store.h
+++ b/pw_kvs/public/pw_kvs/key_value_store.h
@@ -85,8 +85,8 @@
public:
// TODO: Make these configurable
static constexpr size_t kMaxKeyLength = 64;
- static constexpr size_t kMaxEntries = 64;
- static constexpr size_t kMaxUsableSectors = 64;
+ static constexpr size_t kMaxEntries = 256;
+ static constexpr size_t kMaxUsableSectors = 256;
static constexpr size_t kWorkingBufferSizeBytes = (4 * 1024);
// +1 for null-terminator.
@@ -222,12 +222,12 @@
KeyDescriptor(std::string_view key,
uint32_t version,
- Address address,
- State state = kValid)
+ Address addr,
+ State initial_state = kValid)
: key_hash(HashKey(key)),
key_version(version),
- address(address),
- state(state) {}
+ address(addr),
+ state(initial_state) {}
bool deleted() const { return state == kDeleted; }
diff --git a/pw_unit_test/public/pw_unit_test/framework.h b/pw_unit_test/public/pw_unit_test/framework.h
index 6588cc5..64b34f1 100644
--- a/pw_unit_test/public/pw_unit_test/framework.h
+++ b/pw_unit_test/public/pw_unit_test/framework.h
@@ -276,7 +276,7 @@
// Memory region in which to construct test case classes as they are run.
// TODO(frolv): Make the memory pool size configurable.
- static constexpr size_t kTestMemoryPoolSizeBytes = 8192;
+ static constexpr size_t kTestMemoryPoolSizeBytes = 16384;
std::aligned_storage_t<kTestMemoryPoolSizeBytes, alignof(std::max_align_t)>
memory_pool_;
};