From 09b056975dacd1f0f815ad820b6dc9913b0118a3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 23 Jun 2020 18:55:43 -0400 Subject: 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 Reviewed-by: Mark Mentovai --- src/common/stabs_to_module.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common/stabs_to_module.cc') diff --git a/src/common/stabs_to_module.cc b/src/common/stabs_to_module.cc index 049a6cc6..05b25a74 100644 --- a/src/common/stabs_to_module.cc +++ b/src/common/stabs_to_module.cc @@ -45,7 +45,7 @@ namespace google_breakpad { // Demangle using abi call. // Older GCC may not support it. -static string Demangle(const string &mangled) { +static string Demangle(const string& mangled) { int status = 0; char *demangled = abi::__cxa_demangle(mangled.c_str(), NULL, NULL, &status); if (status == 0 && demangled != NULL) { @@ -58,7 +58,7 @@ static string Demangle(const string &mangled) { StabsToModule::~StabsToModule() { // Free any functions we've accumulated but not added to the module. - for (vector::const_iterator func_it = functions_.begin(); + for (vector::const_iterator func_it = functions_.begin(); func_it != functions_.end(); func_it++) delete *func_it; // Free any function that we're currently within. @@ -87,7 +87,7 @@ bool StabsToModule::EndCompilationUnit(uint64_t address) { return true; } -bool StabsToModule::StartFunction(const string &name, +bool StabsToModule::StartFunction(const string& name, uint64_t address) { assert(!current_function_); Module::Function *f = new Module::Function(Demangle(name), address); @@ -131,7 +131,7 @@ bool StabsToModule::Line(uint64_t address, const char *name, int number) { return true; } -bool StabsToModule::Extern(const string &name, uint64_t address) { +bool StabsToModule::Extern(const string& name, uint64_t address) { Module::Extern *ext = new Module::Extern(address); // Older libstdc++ demangle implementations can crash on unexpected // input, so be careful about what gets passed in. @@ -160,7 +160,7 @@ void StabsToModule::Finalize() { sort(functions_.begin(), functions_.end(), Module::Function::CompareByAddress); - for (vector::const_iterator func_it = functions_.begin(); + for (vector::const_iterator func_it = functions_.begin(); func_it != functions_.end(); func_it++) { Module::Function *f = *func_it; -- cgit v1.2.1