From c3e369cc39aae6419b4c26b6e59abf8f4fe249ac Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Sat, 7 Mar 2020 04:33:31 -0500 Subject: [PATCH] os: Build target 'common' without using namespace in headers Part of a changeset to allow building all of 'common' without relying on 'using namespace std' or 'using namespace ceph' at toplevel in headers. Signed-off-by: Adam C. Emerson --- src/os/ObjectStore.h | 10 ++++++---- src/os/Transaction.h | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index c51cd24e5099..41dd45f38e32 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -14,11 +14,13 @@ #ifndef CEPH_OBJECTSTORE_H #define CEPH_OBJECTSTORE_H +#include "include/buffer.h" #include "include/common_fwd.h" #include "include/Context.h" -#include "include/buffer.h" -#include "include/types.h" +#include "include/interval_set.h" #include "include/stringify.h" +#include "include/types.h" + #include "osd/osd_types.h" #include "common/TrackedOp.h" #include "common/WorkQueue.h" @@ -514,7 +516,7 @@ public: uint32_t op_flags = 0) { int total = 0; for (auto p = m.begin(); p != m.end(); p++) { - bufferlist t; + ceph::buffer::list t; int r = read(c, oid, p.get_start(), p.get_len(), t, op_flags); if (r < 0) return r; @@ -554,7 +556,7 @@ public: CollectionHandle &c, const ghobject_t& oid, const string& section_name, - Formatter *f) { + ceph::Formatter *f) { return -ENOTSUP; } diff --git a/src/os/Transaction.h b/src/os/Transaction.h index 88c5fac6c7a4..fe4f25313feb 100644 --- a/src/os/Transaction.h +++ b/src/os/Transaction.h @@ -5,8 +5,10 @@ #include +#include "include/Context.h" #include "include/int_types.h" #include "include/buffer.h" + #include "osd/osd_types.h" #define OPS_PER_PTR 32 @@ -362,7 +364,7 @@ public: } static Context *collect_all_contexts( Transaction& t) { - list contexts; + std::list contexts; contexts.splice(contexts.end(), t.on_applied); contexts.splice(contexts.end(), t.on_commit); contexts.splice(contexts.end(), t.on_applied_sync); -- 2.47.3