diff --git a/include/cista/containers/rtree.h b/include/cista/containers/rtree.h index e767b327..8ee8833c 100644 --- a/include/cista/containers/rtree.h +++ b/include/cista/containers/rtree.h @@ -781,8 +781,8 @@ struct rtree { f.write(reinterpret_cast(&free_list_), sizeof free_list_); f.write(reinterpret_cast(&count_), sizeof count_); f.write(reinterpret_cast(&height_), sizeof height_); - for (int i = 0; i < path_hint_.size(); ++i) { - f.write(reinterpret_cast(&path_hint_[i]), sizeof path_hint_[i]); + for (unsigned int & i : path_hint_) { + f.write(reinterpret_cast(&i), sizeof i); } } @@ -796,8 +796,8 @@ struct rtree { f.read(reinterpret_cast(&free_list_), sizeof free_list_); f.read(reinterpret_cast(&count_), sizeof count_); f.read(reinterpret_cast(&height_), sizeof height_); - for (int i = 0; i < path_hint_.size(); ++i) { - f.read(reinterpret_cast(&path_hint_[i]), sizeof path_hint_[i]); + for (unsigned int & i : path_hint_) { + f.read(reinterpret_cast(&i), sizeof i); } }