eBay / NuRaft

C++ implementation of Raft core logic as a replication library
Apache License 2.0
996 stars 236 forks source link

Should the type be uint8_t instead of size_t for serialize_v1p(...) in srv_state.hxx line 133 #464

Open sldr opened 1 year ago

sldr commented 1 year ago

https://github.com/eBay/NuRaft/blob/188947bcc73ce38ab1c3cf9d01015ca8a29decd9/include/libnuraft/srv_state.hxx#L133

or if it really needs to be size_t then maybe static_cast<uint8_t>() around bs.put_u8(version);

VS 2022 is complaining about it.

Thanks, SLDR

greensky00 commented 1 year ago

Ok, thanks. Would you mind submitting a PR for it? Or please let me know if you want me to fix it.