LibWeb: Make the URL encoding function a little less copy-happy
This commit is contained in:
parent
d1a9afa7cd
commit
d677d23da1
Notes:
sideshowbarker
2024-07-19 06:57:17 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d677d23da15
2 changed files with 4 additions and 4 deletions
Libraries/LibWeb
|
@ -29,7 +29,7 @@
|
|||
|
||||
namespace Web {
|
||||
|
||||
String url_encode(StringView view)
|
||||
String url_encode(const StringView& view)
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
||||
|
@ -46,7 +46,7 @@ String url_encode(StringView view)
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
String url_encode(Vector<URLQueryParam> pairs)
|
||||
String url_encode(const Vector<URLQueryParam>& pairs)
|
||||
{
|
||||
StringBuilder builder;
|
||||
for (size_t i = 0; i < pairs.size(); ++i) {
|
||||
|
|
|
@ -36,8 +36,8 @@ struct URLQueryParam {
|
|||
String value;
|
||||
};
|
||||
|
||||
String url_encode(StringView);
|
||||
String url_encode(Vector<URLQueryParam>);
|
||||
String url_encode(const StringView&);
|
||||
String url_encode(const Vector<URLQueryParam>&);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue