Permalink
Browse files

fix all "class" -> "struct"

  • Loading branch information...
1 parent 35e955c commit 7d41c2f521e27a3c2891e6f1c8da42f0f6f3c266 @evmar evmar committed Dec 29, 2012
Showing with 9 additions and 11 deletions.
  1. +1 −2 src/build.cc
  2. +1 −2 src/build_log.cc
  3. +1 −2 src/clean.h
  4. +1 −2 src/disk_interface_test.cc
  5. +5 −3 src/metrics.h
View
@@ -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:
View
@@ -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_));
View
@@ -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);
@@ -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");
View
@@ -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;
};

0 comments on commit 7d41c2f

Please sign in to comment.