]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
encoding: remove encode_array_nohead
authorJohn Spray <john.spray@redhat.com>
Wed, 28 Jun 2017 13:27:07 +0000 (09:27 -0400)
committerJohn Spray <john.spray@redhat.com>
Wed, 19 Jul 2017 12:58:39 +0000 (08:58 -0400)
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>
src/include/encoding.h
src/os/memstore/PageSet.h

index 0013728efed91b39a7aab00e821c66c196658ed2..f7ee5d118285cf17e03ca83e028dade11d5c1171 100644 (file)
@@ -197,22 +197,6 @@ inline void encode(const char *s, bufferlist& bl)
 }
 
 
-// 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
 
index e989a36107223659359f83d58758eebdd7459c57..a40b86425ec1f47cb6c13cf0be47dc2217195a32 100644 (file)
@@ -58,7 +58,7 @@ struct Page {
     ::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);
   }