]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
buffer: allow caller to initialize bufferhash state
authorSamuel Just <sam.just@inktank.com>
Mon, 17 Feb 2014 01:42:30 +0000 (17:42 -0800)
committerSamuel Just <sam.just@inktank.com>
Tue, 18 Feb 2014 04:12:16 +0000 (20:12 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/include/buffer.h

index 4c275cacae9e284ad780b256fbca84cfd3e8c352..5491105f948747e5cfc48894295e0fc271e0219b 100644 (file)
@@ -448,6 +448,7 @@ public:
 
   public:
     hash() : crc(0) { }
+    hash(uint32_t init) : crc(init) { }
 
     void update(buffer::list& bl) {
       crc = bl.crc32c(crc);