summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2013-04-18 18:27:20 (GMT)
committerEvan Martin <martine@danga.com>2013-04-18 18:27:24 (GMT)
commit9b6b1fd44a589c3725947280ff5a2ce8fc50a387 (patch)
tree23b40282376cbc820525d951d7f33de795daa7fa /src
parent877fdb50d1599ed9a0d2035a95c5a5b811be20ee (diff)
downloadNinja-9b6b1fd44a589c3725947280ff5a2ce8fc50a387.zip
Ninja-9b6b1fd44a589c3725947280ff5a2ce8fc50a387.tar.gz
Ninja-9b6b1fd44a589c3725947280ff5a2ce8fc50a387.tar.bz2
drop std:: qualifiers on more stl datatypes
We "using namespace std" anywhere we need a std::string or a std::vector.
Diffstat (limited to 'src')
-rw-r--r--src/build.h3
-rw-r--r--src/edit_distance.cc4
-rw-r--r--src/line_printer.cc2
-rw-r--r--src/line_printer.h5
-rw-r--r--src/manifest_parser_test.cc2
-rw-r--r--src/ninja_test.cc2
-rw-r--r--src/util_test.cc2
7 files changed, 10 insertions, 10 deletions
diff --git a/src/build.h b/src/build.h
index 5cbd2a6..2715c0c 100644
--- a/src/build.h
+++ b/src/build.h
@@ -268,7 +268,7 @@ struct BuildStatus {
double rate_;
Stopwatch stopwatch_;
const size_t N;
- std::queue<double> times_;
+ queue<double> times_;
int last_update_;
};
@@ -277,4 +277,3 @@ struct BuildStatus {
};
#endif // NINJA_BUILD_H_
-
diff --git a/src/edit_distance.cc b/src/edit_distance.cc
index 22db4fe..cc4483f 100644
--- a/src/edit_distance.cc
+++ b/src/edit_distance.cc
@@ -32,8 +32,8 @@ int EditDistance(const StringPiece& s1,
int m = s1.len_;
int n = s2.len_;
- std::vector<int> previous(n + 1);
- std::vector<int> current(n + 1);
+ vector<int> previous(n + 1);
+ vector<int> current(n + 1);
for (int i = 0; i <= n; ++i)
previous[i] = i;
diff --git a/src/line_printer.cc b/src/line_printer.cc
index 751fb07..a75eb05 100644
--- a/src/line_printer.cc
+++ b/src/line_printer.cc
@@ -42,7 +42,7 @@ LinePrinter::LinePrinter() : have_blank_line_(true) {
#endif
}
-void LinePrinter::Print(std::string to_print, LineType type) {
+void LinePrinter::Print(string to_print, LineType type) {
#ifdef _WIN32
CONSOLE_SCREEN_BUFFER_INFO csbi;
GetConsoleScreenBufferInfo(console_, &csbi);
diff --git a/src/line_printer.h b/src/line_printer.h
index 4226c92..c292464 100644
--- a/src/line_printer.h
+++ b/src/line_printer.h
@@ -16,6 +16,7 @@
#define NINJA_LINE_PRINTER_H_
#include <string>
+using namespace std;
/// Prints lines of text, possibly overprinting previously printed lines
/// if the terminal supports it.
@@ -32,10 +33,10 @@ class LinePrinter {
};
/// Overprints the current line. If type is ELIDE, elides to_print to fit on
/// one line.
- void Print(std::string to_print, LineType type);
+ void Print(string to_print, LineType type);
/// Prints a string on a new line, not overprinting previous output.
- void PrintOnNewLine(const std::string& to_print);
+ void PrintOnNewLine(const string& to_print);
private:
/// Whether we can do fancy terminal control codes.
diff --git a/src/manifest_parser_test.cc b/src/manifest_parser_test.cc
index 76d235d..be749f2 100644
--- a/src/manifest_parser_test.cc
+++ b/src/manifest_parser_test.cc
@@ -701,7 +701,7 @@ TEST_F(ParserTest, DefaultStatements) {
"default $third\n"));
string err;
- std::vector<Node*> nodes = state.DefaultNodes(&err);
+ vector<Node*> nodes = state.DefaultNodes(&err);
EXPECT_EQ("", err);
ASSERT_EQ(3u, nodes.size());
EXPECT_EQ("a", nodes[0]->path());
diff --git a/src/ninja_test.cc b/src/ninja_test.cc
index f091cc8..31754f2 100644
--- a/src/ninja_test.cc
+++ b/src/ninja_test.cc
@@ -18,7 +18,7 @@
#include "gtest/gtest.h"
#include "line_printer.h"
-std::string StringPrintf(const char* format, ...) {
+string StringPrintf(const char* format, ...) {
const int N = 1024;
char buf[N];
diff --git a/src/util_test.cc b/src/util_test.cc
index 4776546..1e29053 100644
--- a/src/util_test.cc
+++ b/src/util_test.cc
@@ -101,7 +101,7 @@ TEST(CanonicalizePath, EmptyResult) {
}
TEST(CanonicalizePath, UpDir) {
- std::string path, err;
+ string path, err;
path = "../../foo/bar.h";
EXPECT_TRUE(CanonicalizePath(&path, &err));
EXPECT_EQ("../../foo/bar.h", path);