mirror of
https://github.com/reactos/ninja.git
synced 2024-11-23 11:49:45 +00:00
Remove unnecessary std::
This commit is contained in:
parent
c2e810ca43
commit
9c5aded874
@ -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));
|
||||
|
@ -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.
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user