Add optional return
This commit is contained in:
@@ -4,6 +4,7 @@ struct LoginInfoPointer;
|
||||
class Buffer;
|
||||
class Cryptography;
|
||||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
enum class Arg
|
||||
{
|
||||
@@ -22,11 +23,11 @@ void print_args();
|
||||
|
||||
Arg get_args(int argc, char** argv, char** label);
|
||||
|
||||
LoginInfoPointer arg_get(Buffer& decrypted_buffer, const char* label);
|
||||
std::optional<LoginInfoPointer> arg_get(Buffer& decrypted_buffer, const char* label);
|
||||
|
||||
LoginInfoPointer arg_generate(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto);
|
||||
std::optional<LoginInfoPointer> arg_generate(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto);
|
||||
|
||||
LoginInfoPointer arg_input(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto);
|
||||
std::optional<LoginInfoPointer> arg_input(Buffer& decrypted_buffer, Buffer& encrypted_buffer, const char* label, Cryptography& crypto);
|
||||
|
||||
void arg_list(Buffer& decrypted_buffer);
|
||||
|
||||
|
@@ -13,8 +13,6 @@ struct LoginInfoPointer
|
||||
{
|
||||
const char* label;
|
||||
const char* password;
|
||||
|
||||
LoginInfoPointer() : label(nullptr), password(nullptr) {}
|
||||
};
|
||||
|
||||
struct Index
|
||||
|
Reference in New Issue
Block a user