diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-27 08:21:11 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-27 08:21:11 +0000 |
commit | 8f3826a7fa25e245cfe1124ee303483c102236d0 (patch) | |
tree | 16852104c3aae569b2100ad1351206b3f7178f45 /samples/sample2.h | |
parent | 221d3c6bd315b45b8ce354d7548c1c519e1e1752 (diff) | |
download | googletest-8f3826a7fa25e245cfe1124ee303483c102236d0.tar.gz |
Makes all samples compile with -Wall -Wshadow -Werror.
git-svn-id: http://googletest.googlecode.com/svn/trunk@383 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'samples/sample2.h')
-rw-r--r-- | samples/sample2.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/samples/sample2.h b/samples/sample2.h index c5f3b8c..5b57e60 100644 --- a/samples/sample2.h +++ b/samples/sample2.h @@ -40,13 +40,13 @@ // A simple string class. class MyString { private: - const char * c_string_; + const char* c_string_; const MyString& operator=(const MyString& rhs); public: // Clones a 0-terminated C string, allocating memory using new. - static const char * CloneCString(const char * c_string); + static const char* CloneCString(const char* a_c_string); //////////////////////////////////////////////////////////// // @@ -56,8 +56,8 @@ class MyString { MyString() : c_string_(NULL) {} // Constructs a MyString by cloning a 0-terminated C string. - explicit MyString(const char * c_string) : c_string_(NULL) { - Set(c_string); + explicit MyString(const char* a_c_string) : c_string_(NULL) { + Set(a_c_string); } // Copy c'tor @@ -72,14 +72,14 @@ class MyString { ~MyString() { delete[] c_string_; } // Gets the 0-terminated C string this MyString object represents. - const char * c_string() const { return c_string_; } + const char* c_string() const { return c_string_; } size_t Length() const { return c_string_ == NULL ? 0 : strlen(c_string_); } // Sets the 0-terminated C string this MyString object represents. - void Set(const char * c_string); + void Set(const char* c_string); }; |