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/processor/tokenize.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/processor/tokenize.cc')
-rw-r--r-- | src/processor/tokenize.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/processor/tokenize.cc b/src/processor/tokenize.cc index 8fce87a2..29e8125a 100644 --- a/src/processor/tokenize.cc +++ b/src/processor/tokenize.cc @@ -42,10 +42,10 @@ namespace google_breakpad { using std::vector; -bool Tokenize(char *line, - const char *separators, - int max_tokens, - vector<char*> *tokens) { +bool Tokenize(char* line, + const char* separators, + int max_tokens, + vector<char*>* tokens) { tokens->clear(); tokens->reserve(max_tokens); @@ -53,8 +53,8 @@ bool Tokenize(char *line, // Split tokens on the separator character. // strip them out before exhausting max_tokens. - char *save_ptr; - char *token = strtok_r(line, separators, &save_ptr); + char* save_ptr; + char* token = strtok_r(line, separators, &save_ptr); while (token && --remaining > 0) { tokens->push_back(token); if (remaining > 1) @@ -69,10 +69,9 @@ bool Tokenize(char *line, return tokens->size() == static_cast<unsigned int>(max_tokens); } -void StringToVector(const string &str, vector<char> &vec) { +void StringToVector(const string& str, vector<char>& vec) { vec.resize(str.length() + 1); - std::copy(str.begin(), str.end(), - vec.begin()); + std::copy(str.begin(), str.end(), vec.begin()); vec[str.length()] = '\0'; } |