Skip to content

Commit 6861313

Browse files
committed
settings(embedis): index size_t -> u16
staying closer to whats expected within the embedis
1 parent 697b856 commit 6861313

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

code/espurna/settings.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ class EepromStorage {
6666
return _instance->data()[pos];
6767
}
6868

69-
void write(size_t pos, Span<const uint8_t> data) const {
69+
void write(uint16_t pos, Span<const uint8_t> data) const {
7070
auto* ptr = const_cast<uint8_t*>(_instance->data()) + pos;
7171
memmove_P(ptr, data.data(), data.size());
7272
}
7373

74-
void write(size_t pos, uint8_t value) const {
74+
void write(uint16_t pos, uint8_t value) const {
7575
write(pos, Span<const uint8_t>(&value, 1));
7676
}
7777

78-
void fill(size_t pos, size_t size, uint8_t value) const {
78+
void fill(uint16_t pos, size_t size, uint8_t value) const {
7979
auto* ptr = const_cast<uint8_t*>(_instance->data()) + pos;
8080
std::fill(ptr, ptr + size, value);
8181
}

0 commit comments

Comments
 (0)