diff options
author | est31 <MTest31@outlook.com> | 2015-04-17 06:10:30 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-04-17 06:10:30 +0200 |
commit | f0a1379e5a9ebc954e95d07c1ad5d71587adc6bc (patch) | |
tree | 38114d9be2e6bf1a0740035c41d5925c23f5036f /src/script | |
parent | 821d0025da3d7dec662e75c6ce2ea32e86aec508 (diff) | |
download | minetest-f0a1379e5a9ebc954e95d07c1ad5d71587adc6bc.tar.gz minetest-f0a1379e5a9ebc954e95d07c1ad5d71587adc6bc.tar.bz2 minetest-f0a1379e5a9ebc954e95d07c1ad5d71587adc6bc.zip |
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.
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/lua_api/l_util.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp index 79a5b252a..0464f46d9 100644 --- a/src/script/lua_api/l_util.cpp +++ b/src/script/lua_api/l_util.cpp @@ -255,8 +255,7 @@ int ModApiUtil::l_get_password_hash(lua_State *L) NO_MAP_LOCK_REQUIRED; std::string name = luaL_checkstring(L, 1); std::string raw_password = luaL_checkstring(L, 2); - std::string hash = translatePassword(name, - narrow_to_wide(raw_password)); + std::string hash = translatePassword(name, raw_password); lua_pushstring(L, hash.c_str()); return 1; } |