mirror of
https://github.com/EvernodeXRPL/sashimono.git
synced 2026-07-31 11:00:24 +00:00
Evernode setup installer. (#87)
This commit is contained in:
@@ -279,6 +279,26 @@ namespace util
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts given string to a uint_64. A wrapper function for std::stoull.
|
||||
* @param str String variable.
|
||||
* @param result Variable to store the answer from the conversion.
|
||||
* @return Returns 0 in a successful conversion and -1 on error.
|
||||
*/
|
||||
int stoull(const std::string &str, uint64_t &result)
|
||||
{
|
||||
try
|
||||
{
|
||||
result = std::stoull(str);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
// Return -1 if any exceptions are captured.
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the user contract directory path when username is given.
|
||||
* @param username Username of the user.
|
||||
@@ -404,7 +424,8 @@ namespace util
|
||||
{
|
||||
params.append(*itr);
|
||||
if (std::next(itr) != input_params.end())
|
||||
params.append(" ");;
|
||||
params.append(" ");
|
||||
;
|
||||
}
|
||||
const int len = 23 + (file_name.length() * 2) + params.length();
|
||||
char command[len];
|
||||
|
||||
Reference in New Issue
Block a user