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/windows/http_upload.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/common/windows/http_upload.cc') diff --git a/src/common/windows/http_upload.cc b/src/common/windows/http_upload.cc index b0cc9078..efee0d58 100644 --- a/src/common/windows/http_upload.cc +++ b/src/common/windows/http_upload.cc @@ -65,7 +65,7 @@ namespace { HINTERNET handle_; }; - wstring UTF8ToWide(const string &utf8) { + wstring UTF8ToWide(const string& utf8) { if (utf8.length() == 0) { return wstring(); } @@ -85,7 +85,7 @@ namespace { return result; } - string WideToMBCP(const wstring &wide, unsigned int cp) { + string WideToMBCP(const wstring& wide, unsigned int cp) { if (wide.length() == 0) { return string(); } @@ -107,7 +107,7 @@ namespace { return result; } - bool GetFileContents(const wstring &filename, vector *contents) { + bool GetFileContents(const wstring& filename, vector* contents) { bool rv = false; // The "open" method on pre-MSVC8 ifstream implementations doesn't accept a // wchar_t* filename, so use _wfopen directly in that case. For VC8 and @@ -141,10 +141,10 @@ namespace { return rv; } - bool CheckParameters(const map ¶meters) { + bool CheckParameters(const map& parameters) { for (map::const_iterator pos = parameters.begin(); pos != parameters.end(); ++pos) { - const wstring &str = pos->first; + const wstring& str = pos->first; if (str.size() == 0) { return false; // disallow empty parameter names } @@ -159,7 +159,7 @@ namespace { } // Converts a UTF16 string to UTF8. - string WideToUTF8(const wstring &wide) { + string WideToUTF8(const wstring& wide) { return WideToMBCP(wide, CP_UTF8); } @@ -305,7 +305,7 @@ namespace { } if (!HttpSendRequest(request.get(), NULL, 0, - const_cast(request_body.data()), + const_cast(request_body.data()), static_cast(request_body.size()))) { return false; } @@ -351,7 +351,7 @@ namespace { return wstring(temp); } - wstring GenerateMultipartPostRequestHeader(const wstring &boundary) { + wstring GenerateMultipartPostRequestHeader(const wstring& boundary) { wstring header = L"Content-Type: multipart/form-data; boundary="; header += boundary; return header; @@ -390,9 +390,9 @@ namespace { return true; } - bool GenerateRequestBody(const map ¶meters, - const map &files, - const wstring &boundary, + bool GenerateRequestBody(const map& parameters, + const map& files, + const wstring& boundary, string *request_body) { string boundary_str = WideToUTF8(boundary); if (boundary_str.empty()) { -- cgit v1.2.1