From 76765503fa6df273dbfaf784bd8eeab18b44c65d Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sun, 12 Jan 2014 13:47:01 +0100 Subject: [PATCH] osd: ostream is enough for build_simple* There is no need to specialize the argument into stringstream. It is replaced by a ostream which is convenient to display errors directly to cerr if appropriate. Signed-off-by: Loic Dachary --- src/osd/OSDMap.cc | 4 ++-- src/osd/OSDMap.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index 8982b5107321..244639112cb7 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -1964,7 +1964,7 @@ int OSDMap::_build_crush_types(CrushWrapper& crush) } int OSDMap::build_simple_crush_map(CephContext *cct, CrushWrapper& crush, - int nosd, stringstream *ss) + int nosd, ostream *ss) { crush.create(); @@ -2007,7 +2007,7 @@ int OSDMap::build_simple_crush_map(CephContext *cct, CrushWrapper& crush, int OSDMap::build_simple_crush_map_from_conf(CephContext *cct, CrushWrapper& crush, - stringstream *ss) + ostream *ss) { const md_config_t *conf = cct->_conf; diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index 2c16056781c7..0725d1e95bdc 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -622,10 +622,10 @@ public: int num_osd, int pg_bits, int pgp_bits); static int _build_crush_types(CrushWrapper& crush); static int build_simple_crush_map(CephContext *cct, CrushWrapper& crush, - int num_osd, stringstream *ss); + int num_osd, ostream *ss); static int build_simple_crush_map_from_conf(CephContext *cct, CrushWrapper& crush, - stringstream *ss); + ostream *ss); bool crush_ruleset_in_use(int ruleset) const; -- 2.47.3