summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-12-29 19:57:14 (GMT)
committerEvan Martin <martine@danga.com>2012-12-29 20:33:15 (GMT)
commit7d41c2f521e27a3c2891e6f1c8da42f0f6f3c266 (patch)
tree18f04d75145b267b36e1b519b27dca50a090a01d
parent35e955cf93c89145a33837d6dded611c18176c9c (diff)
downloadNinja-7d41c2f521e27a3c2891e6f1c8da42f0f6f3c266.zip
Ninja-7d41c2f521e27a3c2891e6f1c8da42f0f6f3c266.tar.gz
Ninja-7d41c2f521e27a3c2891e6f1c8da42f0f6f3c266.tar.bz2
fix all "class" -> "struct"
-rw-r--r--src/build.cc3
-rw-r--r--src/build_log.cc3
-rw-r--r--src/clean.h3
-rw-r--r--src/disk_interface_test.cc3
-rw-r--r--src/metrics.h8
5 files changed, 9 insertions, 11 deletions
diff --git a/src/build.cc b/src/build.cc
index e5429cf..dcb4f45 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -41,8 +41,7 @@
namespace {
/// A CommandRunner that doesn't actually run the commands.
-class DryRunCommandRunner : public CommandRunner {
- public:
+struct DryRunCommandRunner : public CommandRunner {
virtual ~DryRunCommandRunner() {}
// Overridden from CommandRunner:
diff --git a/src/build_log.cc b/src/build_log.cc
index f53ccdc..6b73002 100644
--- a/src/build_log.cc
+++ b/src/build_log.cc
@@ -167,8 +167,7 @@ void BuildLog::Close() {
log_file_ = NULL;
}
-class LineReader {
- public:
+struct LineReader {
explicit LineReader(FILE* file)
: file_(file), buf_end_(buf_), line_start_(buf_), line_end_(NULL) {
memset(buf_, 0, sizeof(buf_));
diff --git a/src/clean.h b/src/clean.h
index 5a23283..19432ab 100644
--- a/src/clean.h
+++ b/src/clean.h
@@ -27,8 +27,7 @@ struct Node;
struct Rule;
struct DiskInterface;
-class Cleaner {
- public:
+struct Cleaner {
/// Build a cleaner object with a real disk interface.
Cleaner(State* state, const BuildConfig& config);
diff --git a/src/disk_interface_test.cc b/src/disk_interface_test.cc
index 32fe9cb..c2315c7 100644
--- a/src/disk_interface_test.cc
+++ b/src/disk_interface_test.cc
@@ -25,8 +25,7 @@
namespace {
-class DiskInterfaceTest : public testing::Test {
- public:
+struct DiskInterfaceTest : public testing::Test {
virtual void SetUp() {
// These tests do real disk accesses, so create a temp dir.
temp_dir_.CreateAndEnter("Ninja-DiskInterfaceTest");
diff --git a/src/metrics.h b/src/metrics.h
index 044011d..b6da859 100644
--- a/src/metrics.h
+++ b/src/metrics.h
@@ -64,16 +64,18 @@ int64_t GetTimeMillis();
/// A simple stopwatch which returns the time
/// in seconds since Restart() was called.
-class Stopwatch {
+struct Stopwatch {
public:
Stopwatch() : started_(0) {}
/// Seconds since Restart() call.
- double Elapsed() const { return 1e-6 * static_cast<double>(Now() - started_); }
+ double Elapsed() const {
+ return 1e-6 * static_cast<double>(Now() - started_);
+ }
void Restart() { started_ = Now(); }
-private:
+ private:
uint64_t started_;
uint64_t Now() const;
};