]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
MDSAuthCaps: use string and vector directly 52365/head
authorRishabh Dave <ridave@redhat.com>
Sat, 24 Jun 2023 04:15:03 +0000 (09:45 +0530)
committerRishabh Dave <ridave@redhat.com>
Sat, 8 Jul 2023 18:59:00 +0000 (00:29 +0530)
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 <ridave@redhat.com>
src/mds/MDSAuthCaps.cc

index b0f07b153aaec1e717f28b39d1cd84cf88fcc1e7..b2b1f0ed7bea03a7602e42797fc3c8cd030e1d9a 100644 (file)
@@ -79,11 +79,11 @@ struct MDSCapParser : qi::grammar<Iterator, MDSAuthCaps()>
             (uid >> gidlist)[_val = phoenix::construct<MDSCapMatch>(_1, _2)] |
             (path >> uid >> gidlist)[_val = phoenix::construct<MDSCapMatch>(_1, _2, _3)] |
              (fs_name >> path)[_val = phoenix::construct<MDSCapMatch>(_2, _1)] |
-             (fs_name >> root_squash)[_val = phoenix::construct<MDSCapMatch>(std::string(), _1, _2)] |
-             (path >> root_squash)[_val = phoenix::construct<MDSCapMatch>(_1, std::string(), _2)] |
+             (fs_name >> root_squash)[_val = phoenix::construct<MDSCapMatch>(string(), _1, _2)] |
+             (path >> root_squash)[_val = phoenix::construct<MDSCapMatch>(_1, string(), _2)] |
              (path)[_val = phoenix::construct<MDSCapMatch>(_1)] |
-             (root_squash)[_val = phoenix::construct<MDSCapMatch>(std::string(), std::string(), _1)] |
-             (fs_name)[_val = phoenix::construct<MDSCapMatch>(std::string(),
+             (root_squash)[_val = phoenix::construct<MDSCapMatch>(string(), string(), _1)] |
+             (fs_name)[_val = phoenix::construct<MDSCapMatch>(string(),
                                                              _1)]);
 
     // capspec = * | r[w][f][p][s]
@@ -123,11 +123,11 @@ struct MDSCapParser : qi::grammar<Iterator, MDSAuthCaps()>
   qi::rule<Iterator, bool()> root_squash;
   qi::rule<Iterator, MDSCapSpec()> capspec;
   qi::rule<Iterator, uint32_t()> uid;
-  qi::rule<Iterator, std::vector<uint32_t>() > uintlist;
-  qi::rule<Iterator, std::vector<uint32_t>() > gidlist;
+  qi::rule<Iterator, vector<uint32_t>() > uintlist;
+  qi::rule<Iterator, vector<uint32_t>() > gidlist;
   qi::rule<Iterator, MDSCapMatch()> match;
   qi::rule<Iterator, MDSCapGrant()> grant;
-  qi::rule<Iterator, std::vector<MDSCapGrant>()> grants;
+  qi::rule<Iterator, vector<MDSCapGrant>()> grants;
   qi::rule<Iterator, MDSAuthCaps()> 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; 
   }