In components/nvs_flash/include/nvs_handle.hpp(283).
Unlike in nvs::NVSHandle::get_item(), the value parameter in nvs::NVSHandle::set_item() is passed "by-value" (by copy).
In addition to a possible performance hit, the sizeof(T) in set_item() is also different when T is an array.
This leads to assymetric behaviour between set and get item:
Is your feature request related to a problem?
In components/nvs_flash/include/nvs_handle.hpp(283). Unlike in
nvs::NVSHandle::get_item()
, thevalue
parameter innvs::NVSHandle::set_item()
is passed "by-value" (by copy).In addition to a possible performance hit, the
sizeof(T)
inset_item()
is also different when T is an array. This leads to assymetric behaviour between set and get item:output:
Describe the solution you'd like.
Pass by reference:
Describe alternatives you've considered.
Well, the "alternative" would be
set_blob()
but it's beside the point as it is meant for variable size raw data.Additional context.
No response