1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

C++11 cleanup on constructors (#6000)

* C++11 cleanup on constructors dir script
This commit is contained in:
Vincent Glize 2017-06-19 23:54:58 +02:00 committed by Loïc Blot
parent 4a78949083
commit 4a5e8ad343
40 changed files with 117 additions and 180 deletions

View file

@ -71,7 +71,7 @@ std::string generate_srp_verifier(const std::string &name,
// get modified if &salt_ptr isn't NULL.
char *salt_ptr = (char *)salt.c_str();
char *bytes_v = NULL;
char *bytes_v = nullptr;
size_t verifier_len = 0;
gen_srp_v(name, password, &salt_ptr, &salt_len, &bytes_v, &verifier_len);
std::string verifier = std::string(bytes_v, verifier_len);
@ -84,9 +84,9 @@ void generate_srp_verifier_and_salt(const std::string &name,
const std::string &password, std::string *verifier,
std::string *salt)
{
char *bytes_v = NULL;
char *bytes_v = nullptr;
size_t verifier_len;
char *salt_ptr = NULL;
char *salt_ptr = nullptr;
size_t salt_len;
gen_srp_v(name, password, &salt_ptr, &salt_len, &bytes_v, &verifier_len);
*verifier = std::string(bytes_v, verifier_len);