mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Refactor around translatePassword
Change types for passed password from wstring to string, which removes converting back and forth in most cases. Move the narrow_to_wide conversion, where its neccessary, closer to irrlicht. Remove trailing spaces in guiPasswordChange.cpp. Make parameters for translatePassword passed as const reference.
This commit is contained in:
parent
821d0025da
commit
f0a1379e5a
8 changed files with 24 additions and 22 deletions
|
@ -43,7 +43,8 @@ wchar_t *narrow_to_wide_c(const char *str);
|
|||
|
||||
std::wstring narrow_to_wide(const std::string &mbs);
|
||||
std::string wide_to_narrow(const std::wstring &wcs);
|
||||
std::string translatePassword(std::string playername, std::wstring password);
|
||||
std::string translatePassword(const std::string &playername,
|
||||
const std::string &password);
|
||||
std::string urlencode(std::string str);
|
||||
std::string urldecode(std::string str);
|
||||
u32 readFlagString(std::string str, const FlagDesc *flagdesc, u32 *flagmask);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue