summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-01-27 02:15:23 (GMT)
committerNico Weber <nicolasweber@gmx.de>2016-01-27 02:15:23 (GMT)
commit3dc91c8e45bca48d05d28293e2db2ceff9cb3287 (patch)
tree7504c1b4b60f6d660b3c4db2270b18736a94576b
parent19a3066bf76bd121ca39ca138577f90bea5a10a2 (diff)
parent9c5aded8743ebac5c4f76a26e7fface04058bcda (diff)
downloadNinja-3dc91c8e45bca48d05d28293e2db2ceff9cb3287.zip
Ninja-3dc91c8e45bca48d05d28293e2db2ceff9cb3287.tar.gz
Ninja-3dc91c8e45bca48d05d28293e2db2ceff9cb3287.tar.bz2
Merge pull request #1085 from tetsuok/remove-unnecessary-std
Remove unnecessary `std::`
-rw-r--r--src/includes_normalize_test.cc10
-rw-r--r--src/ninja.cc4
-rw-r--r--src/subprocess-win32.cc2
-rw-r--r--src/subprocess_test.cc4
-rw-r--r--src/test.cc2
5 files changed, 11 insertions, 11 deletions
diff --git a/src/includes_normalize_test.cc b/src/includes_normalize_test.cc
index aba25d0..f18795c 100644
--- a/src/includes_normalize_test.cc
+++ b/src/includes_normalize_test.cc
@@ -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));
diff --git a/src/ninja.cc b/src/ninja.cc
index a73f83c..691afad 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -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.
diff --git a/src/subprocess-win32.cc b/src/subprocess-win32.cc
index fad66e8..4bab719 100644
--- a/src/subprocess-win32.cc
+++ b/src/subprocess-win32.cc
@@ -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());
diff --git a/src/subprocess_test.cc b/src/subprocess_test.cc
index 066bbb7..2fe4bce 100644
--- a/src/subprocess_test.cc
+++ b/src/subprocess_test.cc
@@ -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);
diff --git a/src/test.cc b/src/test.cc
index aed8db7..d231b90 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -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.