Function name to CamelCase

Signed-off-by: alnzrv <7187657+alnzrv@users.noreply.github.com>
This commit is contained in:
alnzrv 2024-09-09 11:32:23 +02:00 committed by GitHub
parent 826cf7b7dc
commit 2302e280cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,7 +23,7 @@ string Metadata::ToWikiURL(std::string v)
if (colon == string::npos)
return v;
v = encodeWikiURL(v, colon);
v = EncodeWikiURL(v, colon);
// Trying to avoid redirects by constructing the right link.
// TODO: Wikipedia article could be opened in a user's language, but need
@ -41,12 +41,12 @@ std::string Metadata::ToWikimediaCommonsURL(std::string v)
if (v.empty())
return v;
v = encodeWikiURL(v, 0);
v = EncodeWikiURL(v, 0);
return "https://commons.wikimedia.org/wiki/" + v;
}
std::string Metadata::encodeWikiURL(std::string v, int startIndex) {
std::string Metadata::EncodeWikiURL(std::string v, int startIndex) {
// Spaces and ? characters should be corrected to form a valid URL's path.
// Standard percent encoding also encodes other characters like (), which lead to an unnecessary HTTP redirection.
for (auto i = startIndex; i < v.size(); ++i)