]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
buffer: uninline, constify crc32c()
authorSage Weil <sage@inktank.com>
Tue, 10 Sep 2013 01:16:08 +0000 (18:16 -0700)
committerSage Weil <sage@inktank.com>
Tue, 10 Sep 2013 01:16:08 +0000 (18:16 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/common/buffer.cc
src/include/buffer.h

index 0424887139e9be1c041f77c733ed8ba053370990..13fa5805c3f0817ee865d8c93b2ac6ceae8d928c 100644 (file)
@@ -1267,6 +1267,15 @@ int buffer::list::write_fd(int fd) const
   return 0;
 }
 
+__u32 buffer::list::crc32c(__u32 crc) const
+{
+  for (std::list<ptr>::const_iterator it = _buffers.begin();
+       it != _buffers.end();
+       ++it)
+    if (it->length())
+      crc = ceph_crc32c(crc, (unsigned char*)it->c_str(), it->length());
+  return crc;
+}
 
 void buffer::list::hexdump(std::ostream &out) const
 {
index 077cf0d9b0b7329e8690e6661bba9a5bd301916c..f4a2f5c32645ae947ca22f5f6554f9769d72f6ef 100644 (file)
@@ -420,15 +420,7 @@ public:
     ssize_t read_fd(int fd, size_t len);
     int write_file(const char *fn, int mode=0644);
     int write_fd(int fd) const;
-    __u32 crc32c(__u32 crc) {
-      for (std::list<ptr>::const_iterator it = _buffers.begin(); 
-          it != _buffers.end(); 
-          ++it)
-       if (it->length())
-         crc = ceph_crc32c(crc, (unsigned char*)it->c_str(), it->length());
-      return crc;
-    }
-
+    __u32 crc32c(__u32 crc) const;
   };
 
   /*