]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/buffer: changed buffer from class to namespace
authorMichal Jarzabek <stiopa@gmail.com>
Sun, 22 Nov 2015 12:12:47 +0000 (12:12 +0000)
committerMichal Jarzabek <stiopa@gmail.com>
Mon, 30 Nov 2015 19:38:44 +0000 (19:38 +0000)
commitaa38700396ed766cf1876040b8502962f07fbddc
tree9432d563afabcae8b0a963af452d85c10d2ef3ec
parent304965f17ead56f1e687a85c2f09bade46397656
common/buffer: changed buffer from class to namespace

Since the buffer only contained static functions it doesn't make sense
for it to be a class. Changing it to a namespace will allow
bufferlist, bufferptr and bufferhash to be forward declared.
This wasn't possible when they were nested classes.

Function declarations for
inc_total_alloc and
dec_total_alloc
were removed from the header file and changed to static, to simulate
the private access specifier, which they were under.

Moved the operators inside the buffer namespace to take advantage of
the Argument Dependent Lookup.

Moved typedefs to  buffer_fwd header file which we can include when
only the forward declarations are needed.

Since the buffer is not a class anymore all the instances of
using ceph::buffer
were removed.

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/common/buffer.cc
src/include/Makefile.am
src/include/buffer.h
src/include/buffer_fwd.h [new file with mode: 0644]
src/test/librados/cls.cc
src/test/librados/cmd.cc
src/test/librados/misc.cc
src/test/librados/tier.cc
src/test/multi_stress_watch.cc
src/test/test_stress_watch.cc