]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/options: consolidate Option::to_str() with operator<< 20419/head
authorKefu Chai <kchai@redhat.com>
Wed, 7 Mar 2018 16:46:06 +0000 (00:46 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 9 Mar 2018 05:01:05 +0000 (13:01 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/options.cc

index d89667c1ce5384a9474192054c02afe14501ab64..e81d1679db6c7a22eb357c0c8ce39df527f20248 100644 (file)
@@ -323,17 +323,6 @@ void Option::dump(Formatter *f) const
 
 std::string Option::to_str(const Option::value_t& v)
 {
-  if (boost::get<boost::blank>(&v)) {
-    return string();
-  }
-  if (const bool *flag = boost::get<const bool>(&v)) {
-    return *flag ? "true" : "false";
-  }
-  if (const double *dp = boost::get<const double>(&v)) {
-    ostringstream oss;
-    oss << std::fixed << *dp;
-    return oss.str();
-  }
   return stringify(v);
 }