Skip to content

Commit

Permalink
pw_kvs: Minor adjustments for -Weffc++
Browse files Browse the repository at this point in the history
Make a few minor updates to pw_kvs to silence -Weffc++ warnings. Pigweed
does not support -Weffc++ in general, since it enforces compliance with
a style guide it does not follow.

Fixes: b/234874590, b/234875054
Change-Id: I97a85ea175b5deb900de07c3095daee2116e2666
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/101301
Reviewed-by: Armando Montanez <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
Pigweed-Auto-Submit: Wyatt Hepler <[email protected]>
  • Loading branch information
255 authored and CQ Bot Account committed Jul 8, 2022
1 parent ab0e417 commit 0c7cba1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pw_kvs/public/pw_kvs/alignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class AlignedWriter {
// TODO(hepler): Add DCHECK to ensure that buffer.size() >= alignment_bytes.
}

AlignedWriter(const AlignedWriter&) = delete;
AlignedWriter& operator=(const AlignedWriter&) = delete;

~AlignedWriter() {
Flush().IgnoreError(); // TODO(pwbug/387): Handle Status properly
}
Expand Down
5 changes: 4 additions & 1 deletion pw_kvs/public/pw_kvs/key_value_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,10 @@ class KeyValueStoreBuffer : public KeyValueStore {
sectors_,
temp_sectors_to_skip_,
key_descriptors_,
addresses_) {
addresses_),
sectors_(),
key_descriptors_(),
formats_() {
std::copy(formats.begin(), formats.end(), formats_.begin());
}

Expand Down

0 comments on commit 0c7cba1

Please sign in to comment.