]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
messages: remove `using namespace std` in headers
authorJohn Spray <john.spray@redhat.com>
Thu, 28 Aug 2014 12:40:34 +0000 (13:40 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 28 Aug 2014 13:04:09 +0000 (14:04 +0100)
Avoid polluting global namespace: .cc files should
do the `using` if they want it.

Signed-off-by: John Spray <john.spray@redhat.com>
src/messages/MClientReply.h
src/messages/MDiscover.h
src/messages/MDiscoverReply.h
src/messages/MExportDirNotify.h
src/messages/MExportDirNotifyAck.h
src/messages/MMDSFragmentNotify.h

index 6507fa65321dba090acfff4e1528c9b72016dad6..b381133f0d5bfb906cf8b33595d442f952acd1db 100644 (file)
@@ -23,9 +23,6 @@
 #include "include/ceph_features.h"
 #include "common/errno.h"
 
-#include <vector>
-using namespace std;
-
 /***
  *
  * MClientReply - container message for MDS reply to a client's MClientRequest
index c37565dbef530f8a5929c41bcf2bb060f549c638..aab6ccb351e05824767d65ce843cf5abee174ed6 100644 (file)
@@ -19,9 +19,7 @@
 #include "msg/Message.h"
 #include "include/filepath.h"
 
-#include <vector>
 #include <string>
-using namespace std;
 
 
 class MDiscover : public Message {
@@ -40,7 +38,7 @@ class MDiscover : public Message {
   snapid_t  get_snapid() { return snapid; }
 
   filepath& get_want() { return want; }
-  const string& get_dentry(int n) { return want[n]; }
+  const std::string& get_dentry(int n) { return want[n]; }
 
   bool wants_base_dir() { return want_base_dir; }
   bool wants_xlocked() { return want_xlocked; }
index a28321ac4c5bec72d2984024734b20dd5c540afb..4c2527802b974d683af37110e424b4da3a879c30 100644 (file)
@@ -19,9 +19,7 @@
 #include "msg/Message.h"
 #include "include/filepath.h"
 
-#include <vector>
 #include <string>
-using namespace std;
 
 
 
@@ -37,7 +35,7 @@ using namespace std;
  * they are false if there is no returned data, ie the first group is empty.
  *
  * we also return errors:
- *   error_flag_dn(string) - the specified dentry dne
+ *   error_flag_dn(std::string) - the specified dentry dne
  *   error_flag_dir        - the last item wasn't a dir, so we couldn't continue.
  *
  * and sometimes,
@@ -79,7 +77,7 @@ class MDiscoverReply : public Message {
   // and the response
   bool flag_error_dn;
   bool flag_error_dir;
-  string error_dentry;   // dentry that was not found (to trigger waiters on asker)
+  std::string error_dentry;   // dentry that was not found (to trigger waiters on asker)
   bool unsolicited;
 
   __s32 dir_auth_hint;
@@ -99,7 +97,7 @@ class MDiscoverReply : public Message {
 
   bool is_flag_error_dn() { return flag_error_dn; }
   bool is_flag_error_dir() { return flag_error_dir; }
-  string& get_error_dentry() { return error_dentry; }
+  std::string& get_error_dentry() { return error_dentry; }
 
   int get_starts_with() { return starts_with; }
 
@@ -160,7 +158,7 @@ public:
   }
 
   //  void set_flag_forward() { flag_forward = true; }
-  void set_flag_error_dn(const string& dn) { 
+  void set_flag_error_dn(const std::string& dn) { 
     flag_error_dn = true; 
     error_dentry = dn; 
   }
@@ -170,7 +168,7 @@ public:
   void set_dir_auth_hint(int a) {
     dir_auth_hint = a;
   }
-  void set_error_dentry(const string& dn) {
+  void set_error_dentry(const std::string& dn) {
     error_dentry = dn;
   }
 
index 745cf95f709db4f8b9fef8307066dcef8ce28e8c..bd5c2330d11a315ac04f2750f2a36a999e47450a 100644 (file)
@@ -16,8 +16,6 @@
 #define CEPH_MEXPORTDIRNOTIFY_H
 
 #include "msg/Message.h"
-#include <string>
-using namespace std;
 
 class MExportDirNotify : public Message {
   dirfrag_t base;
index 7b52c4f607c9fed499755f576fab3130f8a067a5..aa246597b0422ac75802f6c39459e42ea75605cf 100644 (file)
@@ -16,8 +16,6 @@
 #define CEPH_MEXPORTDIRNOTIFYACK_H
 
 #include "msg/Message.h"
-#include <string>
-using namespace std;
 
 class MExportDirNotifyAck : public Message {
   dirfrag_t dirfrag;
index 46b883786c7bea27c4bbae5135df16a672cb6ed6..d95751e3481178db5e40b99f2afc0e8b6962f0cf 100644 (file)
@@ -16,8 +16,6 @@
 #define CEPH_MMDSFRAGMENTNOTIFY_H
 
 #include "msg/Message.h"
-#include <string>
-using namespace std;
 
 class MMDSFragmentNotify : public Message {
   inodeno_t ino;