From 8bfe6a4994de249485c6f25bceb59cb9edcd3865 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Thu, 28 Mar 2019 21:41:52 -0400 Subject: [PATCH] cls/lock: Update cls_lock_types.h to work without using namespace Signed-off-by: Adam C. Emerson --- src/cls/lock/cls_lock_types.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/cls/lock/cls_lock_types.h b/src/cls/lock/cls_lock_types.h index 75796996e7b..8a0ae0ebe98 100644 --- a/src/cls/lock/cls_lock_types.h +++ b/src/cls/lock/cls_lock_types.h @@ -59,18 +59,18 @@ namespace rados { */ struct locker_id_t { entity_name_t locker; // locker's client name - string cookie; // locker's cookie. + std::string cookie; // locker's cookie. locker_id_t() {} - locker_id_t(entity_name_t& _n, const string& _c) : locker(_n), cookie(_c) {} + locker_id_t(entity_name_t& _n, const std::string& _c) : locker(_n), cookie(_c) {} - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { ENCODE_START(1, 1, bl); encode(locker, bl); encode(cookie, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { DECODE_START_LEGACY_COMPAT_LEN(1, 1, 1, bl); decode(locker, bl); decode(cookie, bl); @@ -93,20 +93,20 @@ namespace rados { { utime_t expiration; // expiration: non-zero means epoch of locker expiration entity_addr_t addr; // addr: locker address - string description; // description: locker description, may be empty + std::string description; // description: locker description, may be empty locker_info_t() {} locker_info_t(const utime_t& _e, const entity_addr_t& _a, - const string& _d) : expiration(_e), addr(_a), description(_d) {} + const std::string& _d) : expiration(_e), addr(_a), description(_d) {} - void encode(bufferlist &bl, uint64_t features) const { + void encode(ceph::buffer::list &bl, uint64_t features) const { ENCODE_START(1, 1, bl); encode(expiration, bl); encode(addr, bl, features); encode(description, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { DECODE_START_LEGACY_COMPAT_LEN(1, 1, 1, bl); decode(expiration, bl); decode(addr, bl); @@ -121,11 +121,11 @@ namespace rados { struct lock_info_t { map lockers; // map of lockers ClsLockType lock_type; // lock type (exclusive / shared) - string tag; // tag: operations on lock can only succeed with this tag + std::string tag; // tag: operations on lock can only succeed with this tag // as long as set of non expired lockers // is bigger than 0. - void encode(bufferlist &bl, uint64_t features) const { + void encode(ceph::buffer::list &bl, uint64_t features) const { ENCODE_START(1, 1, bl); encode(lockers, bl, features); uint8_t t = (uint8_t)lock_type; @@ -133,7 +133,7 @@ namespace rados { encode(tag, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { DECODE_START_LEGACY_COMPAT_LEN(1, 1, 1, bl); decode(lockers, bl); uint8_t t; -- 2.47.3