diff options
author | Mike Frysinger <vapier@chromium.org> | 2020-06-23 18:55:43 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@chromium.org> | 2020-07-15 06:20:02 +0000 |
commit | 09b056975dacd1f0f815ad820b6dc9913b0118a3 (patch) | |
tree | 67ba67549b44e6d98b9ff2dfb3e0396e0a252b96 /src/common/stabs_reader_unittest.cc | |
parent | Add support for dwarf5 line tables. (diff) | |
download | breakpad-09b056975dacd1f0f815ad820b6dc9913b0118a3.tar.xz |
fix pointer style to match the style guide
We do this in a lot of places, but we're inconsistent.
Normalize the code to the Google C++ style guide.
Change-Id: Ic2aceab661ce8f6b993dda21b1cdf5d2198dcbbf
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2262932
Reviewed-by: Sterling Augustine <saugustine@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common/stabs_reader_unittest.cc')
-rw-r--r-- | src/common/stabs_reader_unittest.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/common/stabs_reader_unittest.cc b/src/common/stabs_reader_unittest.cc index a84da1c4..24f3e1a5 100644 --- a/src/common/stabs_reader_unittest.cc +++ b/src/common/stabs_reader_unittest.cc @@ -75,7 +75,7 @@ class StringAssembler: public Section { // Add the string S to this StringAssembler, and return the string's // offset within this compilation unit's strings. If S has been added // already, this returns the offset of its first instance. - size_t Add(const string &s) { + size_t Add(const string& s) { map<string, size_t>::iterator it = added_.find(s); if (it != added_.end()) return it->second; @@ -127,7 +127,7 @@ class StringAssembler: public Section { class StabsAssembler: public Section { public: // Create a StabsAssembler that uses StringAssembler for its strings. - StabsAssembler(StringAssembler *string_assembler) + StabsAssembler(StringAssembler* string_assembler) : Section(string_assembler->endianness()), string_assembler_(string_assembler), value_size_(0), @@ -137,7 +137,7 @@ class StabsAssembler: public Section { // Accessor and setter for value_size_. size_t value_size() const { return value_size_; } - StabsAssembler &set_value_size(size_t value_size) { + StabsAssembler& set_value_size(size_t value_size) { value_size_ = value_size; return *this; } @@ -147,7 +147,7 @@ class StabsAssembler: public Section { // its compilation unit's portion of the .stabstr section; this can be a // value generated by a StringAssembler. Return a reference to this // StabsAssembler. - StabsAssembler &Stab(uint8_t type, uint8_t other, Label descriptor, + StabsAssembler& Stab(uint8_t type, uint8_t other, Label descriptor, Label value, Label name) { D32(name); D8(type); @@ -159,15 +159,15 @@ class StabsAssembler: public Section { } // As above, but automatically add NAME to our StringAssembler. - StabsAssembler &Stab(uint8_t type, uint8_t other, Label descriptor, - Label value, const string &name) { + StabsAssembler& Stab(uint8_t type, uint8_t other, Label descriptor, + Label value, const string& name) { return Stab(type, other, descriptor, value, string_assembler_->Add(name)); } // Start a compilation unit named NAME, with an N_UNDF symbol to start // it, and its own portion of the string section. Return a reference to // this StabsAssembler. - StabsAssembler &StartCU(const string &name) { + StabsAssembler& StartCU(const string& name) { assert(!cu_header_); cu_header_ = new CUHeader; string_assembler_->StartCU(); @@ -180,7 +180,7 @@ class StabsAssembler: public Section { // Close off the current compilation unit. Return a reference to this // StabsAssembler. - StabsAssembler &EndCU() { + StabsAssembler& EndCU() { assert(cu_header_); cu_header_->final_entry_count = entry_count_; cu_header_->final_string_size = string_assembler_->EndCU(); @@ -201,7 +201,7 @@ class StabsAssembler: public Section { }; // The strings for our STABS entries. - StringAssembler *string_assembler_; + StringAssembler* string_assembler_; // The size of the 'value' field of stabs entries in this section. size_t value_size_; @@ -211,20 +211,20 @@ class StabsAssembler: public Section { // Header labels for this compilation unit, if we've started one but not // finished it. - CUHeader *cu_header_; + CUHeader* cu_header_; }; class MockStabsReaderHandler: public StabsHandler { public: MOCK_METHOD3(StartCompilationUnit, - bool(const char *, uint64_t, const char *)); + bool(const char*, uint64_t, const char*)); MOCK_METHOD1(EndCompilationUnit, bool(uint64_t)); - MOCK_METHOD2(StartFunction, bool(const string &, uint64_t)); + MOCK_METHOD2(StartFunction, bool(const string&, uint64_t)); MOCK_METHOD1(EndFunction, bool(uint64_t)); - MOCK_METHOD3(Line, bool(uint64_t, const char *, int)); - MOCK_METHOD2(Extern, bool(const string &, uint64_t)); - void Warning(const char *format, ...) { MockWarning(format); } - MOCK_METHOD1(MockWarning, void(const char *)); + MOCK_METHOD3(Line, bool(uint64_t, const char*, int)); + MOCK_METHOD2(Extern, bool(const string&, uint64_t)); + void Warning(const char* format, ...) { MockWarning(format); } + MOCK_METHOD1(MockWarning, void(const char*)); }; struct StabsFixture { @@ -243,9 +243,9 @@ struct StabsFixture { // Run the parser on the test input, passing whatever we find to HANDLER. StabsReader reader( - reinterpret_cast<const uint8_t *>(stabs_contents.data()), + reinterpret_cast<const uint8_t*>(stabs_contents.data()), stabs_contents.size(), - reinterpret_cast<const uint8_t *>(stabstr_contents.data()), + reinterpret_cast<const uint8_t*>(stabstr_contents.data()), stabstr_contents.size(), stabs.endianness() == kBigEndian, stabs.value_size(), unitized, &mock_handler); |