This was just a for loop. No longer needed for
MonCommands, and the usage in memstore/PageSet
was just iterating over char* and should never have
been there to begin with.
Signed-off-by: John Spray <john.spray@redhat.com>
}
-// array
-template<class A>
-inline void encode_array_nohead(const A a[], int n, bufferlist &bl)
-{
- for (int i=0; i<n; i++)
- encode(a[i], bl);
-}
-template<class A>
-inline void decode_array_nohead(A a[], int n, bufferlist::iterator &p)
-{
- for (int i=0; i<n; i++)
- decode(a[i], p);
-}
-
-
-
// -----------------------------
// buffers
::encode(offset, bl);
}
void decode(bufferlist::iterator &p, size_t page_size) {
- ::decode_array_nohead(data, page_size, p);
+ p.copy(page_size, data);
::decode(offset, p);
}