Skip to content

Commit 755444b

Browse files
committed
WearLevel takes param pack
Need to do auto& or else ctors that take a reference will make a copy
1 parent 81a526c commit 755444b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/wear_level.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public:
2525
// Scan the block from top to bottom for the first valid data.
2626
// Assign the cell_ value such that the next cell we will (try to) write is
2727
// the cell after the one containing the first valid data
28-
WearLeveler(auto storage_init)
29-
: storage{storage_init} {
28+
WearLeveler(auto &...storage_init)
29+
: storage{storage_init...} {
3030
data_t data;
3131
while (cell_) {
3232
if (storage.read(&data, --cell_)) {

0 commit comments

Comments
 (0)