}
class obj_iterator {
- RGWObjManifest *manifest;
- uint64_t part_ofs; /* where current part starts */
- uint64_t stripe_ofs; /* where current stripe starts */
- uint64_t ofs; /* current position within the object */
- uint64_t stripe_size; /* current part size */
-
- int cur_part_id;
- int cur_stripe;
+ RGWObjManifest *manifest = nullptr;
+ uint64_t part_ofs = 0; /* where current part starts */
+ uint64_t stripe_ofs = 0; /* where current stripe starts */
+ uint64_t ofs = 0; /* current position within the object */
+ uint64_t stripe_size = 0; /* current part size */
+
+ int cur_part_id = 0;
+ int cur_stripe = 0;
string cur_override_prefix;
rgw_obj_select location;
map<uint64_t, RGWObjManifestPart>::iterator explicit_iter;
- void init() {
- part_ofs = 0;
- stripe_ofs = 0;
- ofs = 0;
- stripe_size = 0;
- cur_part_id = 0;
- cur_stripe = 0;
- }
-
void update_explicit_pos();
}
public:
- obj_iterator() : manifest(NULL) {
- init();
- }
- explicit obj_iterator(RGWObjManifest *_m) : manifest(_m) {
- init();
- if (!manifest->empty()) {
- seek(0);
- }
- }
+ obj_iterator() = default;
+ explicit obj_iterator(RGWObjManifest *_m)
+ : obj_iterator(_m, 0)
+ {}
obj_iterator(RGWObjManifest *_m, uint64_t _ofs) : manifest(_m) {
- init();
if (!manifest->empty()) {
seek(_ofs);
}