buffet: fixed the style of using 'const' with pointers and references
Using 'const type*' and 'const type&' instead of 'type const*'...
BUG=None
TEST=Code still compiles.
Change-Id: I3de0e32067563d0e6fd91dcc9a4cd2232bb76b1a
Reviewed-on: https://chromium-review.googlesource.com/195434
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/data_encoding.h b/buffet/data_encoding.h
index 7a4eda0..b7223bd 100644
--- a/buffet/data_encoding.h
+++ b/buffet/data_encoding.h
@@ -16,28 +16,28 @@
// Encode/escape string to be used in the query portion of a URL.
// If |encodeSpaceAsPlus| is set to true, spaces are encoded as '+' instead
// of "%20"
-std::string UrlEncode(char const* data, bool encodeSpaceAsPlus);
+std::string UrlEncode(const char* data, bool encodeSpaceAsPlus);
-inline std::string UrlEncode(char const* data) {
+inline std::string UrlEncode(const char* data) {
return UrlEncode(data, true);
}
// Decodes/unescapes a URL. Replaces all %XX sequences with actual characters.
// Also replaces '+' with spaces.
-std::string UrlDecode(char const* data);
+std::string UrlDecode(const char* data);
// Converts a list of key-value pairs into a string compatible with
// 'application/x-www-form-urlencoded' content encoding.
-std::string WebParamsEncode(WebParamList const& params, bool encodeSpaceAsPlus);
+std::string WebParamsEncode(const WebParamList& params, bool encodeSpaceAsPlus);
-inline std::string WebParamsEncode(WebParamList const& params) {
+inline std::string WebParamsEncode(const WebParamList& params) {
return WebParamsEncode(params, true);
}
// Parses a string of '&'-delimited key-value pairs (separated by '=') and
// encoded in a way compatible with 'application/x-www-form-urlencoded'
// content encoding.
-WebParamList WebParamsDecode(std::string const& data);
+WebParamList WebParamsDecode(const std::string& data);
} // namespace data_encoding
} // namespace chromeos