Remove unnecessary `std::`
authorTetsuo Kiso <tetsuokiso9@gmail.com>
Sun, 10 Jan 2016 13:23:35 +0000 (05:23 -0800)
committerTetsuo Kiso <tetsuokiso9@gmail.com>
Sun, 10 Jan 2016 13:23:35 +0000 (05:23 -0800)
src/includes_normalize_test.cc
src/ninja.cc
src/subprocess-win32.cc
src/subprocess_test.cc
src/test.cc

index aba25d0..f18795c 100644 (file)
@@ -30,15 +30,15 @@ string GetCurDir() {
   return parts[parts.size() - 1];
 }
 
-string NormalizeAndCheckNoError(const std::string& input) {
+string NormalizeAndCheckNoError(const string& input) {
   string result, err;
   EXPECT_TRUE(IncludesNormalize::Normalize(input.c_str(), NULL, &result, &err));
   EXPECT_EQ("", err);
   return result;
 }
 
-string NormalizeRelativeAndCheckNoError(const std::string& input,
-                                        const std::string& relative_to) {
+string NormalizeRelativeAndCheckNoError(const string& input,
+                                        const string& relative_to) {
   string result, err;
   EXPECT_TRUE(IncludesNormalize::Normalize(input.c_str(), relative_to.c_str(),
                                            &result, &err));
@@ -160,8 +160,8 @@ TEST(IncludesNormalize, LongInvalidPath) {
       "012345678\\"
       "012345678\\"
       "0123456789";
-  std::string forward_slashes(kExactlyMaxPath);
-  std::replace(forward_slashes.begin(), forward_slashes.end(), '\\', '/');
+  string forward_slashes(kExactlyMaxPath);
+  replace(forward_slashes.begin(), forward_slashes.end(), '\\', '/');
   // Make sure a path that's exactly _MAX_PATH long is canonicalized.
   EXPECT_EQ(forward_slashes,
             NormalizeAndCheckNoError(kExactlyMaxPath));
index a73f83c..691afad 100644 (file)
@@ -701,7 +701,7 @@ int NinjaMain::ToolUrtle(int argc, char** argv) {
     if ('0' <= *p && *p <= '9') {
       count = count*10 + *p - '0';
     } else {
-      for (int i = 0; i < std::max(count, 1); ++i)
+      for (int i = 0; i < max(count, 1); ++i)
         printf("%c", *p);
       count = 0;
     }
@@ -1163,7 +1163,7 @@ int main(int argc, char** argv) {
 #if defined(_MSC_VER)
   // Set a handler to catch crashes not caught by the __try..__except
   // block (e.g. an exception in a stack-unwind-block).
-  std::set_terminate(TerminateHandler);
+  set_terminate(TerminateHandler);
   __try {
     // Running inside __try ... __except suppresses any Windows error
     // dialogs for errors such as bad_alloc.
index fad66e8..4bab719 100644 (file)
@@ -255,7 +255,7 @@ bool SubprocessSet::DoWork() {
 
   if (subproc->Done()) {
     vector<Subprocess*>::iterator end =
-        std::remove(running_.begin(), running_.end(), subproc);
+        remove(running_.begin(), running_.end(), subproc);
     if (running_.end() != end) {
       finished_.push(subproc);
       running_.resize(end - running_.begin());
index 066bbb7..2fe4bce 100644 (file)
@@ -159,8 +159,8 @@ TEST_F(SubprocessTest, Console) {
     // Test that stdin, stdout and stderr are a terminal.
     // Also check that the current process is connected to a terminal.
     Subprocess* subproc =
-        subprocs_.Add(std::string("test -t 0 -a -t 1 -a -t 2 && ") +
-                          std::string(kIsConnectedToTerminal),
+        subprocs_.Add(string("test -t 0 -a -t 1 -a -t 2 && ") +
+                      string(kIsConnectedToTerminal),
                       /*use_console=*/true);
     ASSERT_NE((Subprocess*)0, subproc);
 
index aed8db7..d231b90 100644 (file)
@@ -115,7 +115,7 @@ void VerifyGraph(const State& state) {
     for (vector<Node*>::const_iterator in_node = (*e)->inputs_.begin();
          in_node != (*e)->inputs_.end(); ++in_node) {
       const vector<Edge*>& out_edges = (*in_node)->out_edges();
-      EXPECT_NE(std::find(out_edges.begin(), out_edges.end(), *e),
+      EXPECT_NE(find(out_edges.begin(), out_edges.end(), *e),
                 out_edges.end());
     }
     // Check that the edge's outputs have the edge as in-edge.