From 34f2243b8c89ed13760eb55994bef5f1a679ab24 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Sat, 24 Jun 2023 09:45:03 +0530 Subject: [PATCH] MDSAuthCaps: use string and vector directly Since std::string and std::vector are brought into the current namespace at the beginning of MDSAuthCaps.cc, write "string" and "vector" instead of "std::string" and "std::vector" respectively. Signed-off-by: Rishabh Dave --- src/mds/MDSAuthCaps.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mds/MDSAuthCaps.cc b/src/mds/MDSAuthCaps.cc index b0f07b153aa..b2b1f0ed7be 100644 --- a/src/mds/MDSAuthCaps.cc +++ b/src/mds/MDSAuthCaps.cc @@ -79,11 +79,11 @@ struct MDSCapParser : qi::grammar (uid >> gidlist)[_val = phoenix::construct(_1, _2)] | (path >> uid >> gidlist)[_val = phoenix::construct(_1, _2, _3)] | (fs_name >> path)[_val = phoenix::construct(_2, _1)] | - (fs_name >> root_squash)[_val = phoenix::construct(std::string(), _1, _2)] | - (path >> root_squash)[_val = phoenix::construct(_1, std::string(), _2)] | + (fs_name >> root_squash)[_val = phoenix::construct(string(), _1, _2)] | + (path >> root_squash)[_val = phoenix::construct(_1, string(), _2)] | (path)[_val = phoenix::construct(_1)] | - (root_squash)[_val = phoenix::construct(std::string(), std::string(), _1)] | - (fs_name)[_val = phoenix::construct(std::string(), + (root_squash)[_val = phoenix::construct(string(), string(), _1)] | + (fs_name)[_val = phoenix::construct(string(), _1)]); // capspec = * | r[w][f][p][s] @@ -123,11 +123,11 @@ struct MDSCapParser : qi::grammar qi::rule root_squash; qi::rule capspec; qi::rule uid; - qi::rule() > uintlist; - qi::rule() > gidlist; + qi::rule() > uintlist; + qi::rule() > gidlist; qi::rule match; qi::rule grant; - qi::rule()> grants; + qi::rule()> grants; qi::rule mdscaps; }; @@ -366,7 +366,7 @@ bool MDSAuthCaps::parse(string_view str, ostream *err) if (err) *err << "mds capability parse failed, stopped at '" - << std::string(iter, end) + << string(iter, end) << "' of '" << str << "'"; return false; } -- 2.47.3