fix all "class" -> "struct"

This commit is contained in:
Evan Martin 2012-12-29 11:57:14 -08:00
parent 35e955cf93
commit 7d41c2f521
5 changed files with 9 additions and 11 deletions

View File

@ -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 File

@ -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 File

@ -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);

View File

@ -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 File

@ -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;
};