From 6a1fbe23a12dcee351166197ea7ccd6b1e8c6caa Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Sun, 4 Apr 2021 21:56:22 -0700 Subject: [PATCH] cleaning code --- include/bank.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/bank.hpp b/include/bank.hpp index 7fe18db..5cb6b2d 100644 --- a/include/bank.hpp +++ b/include/bank.hpp @@ -98,17 +98,17 @@ public: }); return res; } - int_fast16_t VerifyPassword(const std::string &name, const std::string &attempt) const + int_fast8_t VerifyPassword(const std::string &name, const std::string &attempt) const { - int_fast16_t res = -1; + int_fast8_t res = -1; users.if_contains(name, [&res, &attempt](const User &u) { res = u.password == attempt; }); return res; } - int_fast16_t ChangePassword(const std::string &name, const std::string &attempt, std::string &&new_pass) + int_fast8_t ChangePassword(const std::string &name, const std::string &attempt, std::string &&new_pass) { - int_fast16_t res = -1; + int_fast8_t res = -1; users.modify_if(name, [&res, &attempt, &new_pass](User &u) { res = (u.password == attempt); if (res)