diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-06-12 12:32:14 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-06-12 12:32:14 +0000 |
commit | 9fa9cb8fa13049fa4ba28d31159b4e1a0c6c0432 (patch) | |
tree | 5a766717b6af2be67b1475ae2b520e1918599dc1 /src/account.cpp | |
parent | 7a8b2b11e989e474dceb30330852174d877b1601 (diff) | |
download | manaserv-9fa9cb8fa13049fa4ba28d31159b4e1a0c6c0432.tar.gz manaserv-9fa9cb8fa13049fa4ba28d31159b4e1a0c6c0432.tar.bz2 manaserv-9fa9cb8fa13049fa4ba28d31159b4e1a0c6c0432.tar.xz manaserv-9fa9cb8fa13049fa4ba28d31159b4e1a0c6c0432.zip |
Some cleanups mostly in account class formatting.
Diffstat (limited to 'src/account.cpp')
-rw-r--r-- | src/account.cpp | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/src/account.cpp b/src/account.cpp index a4d704ff..a72068b8 100644 --- a/src/account.cpp +++ b/src/account.cpp @@ -23,21 +23,21 @@ #include "account.h" -Account::Account(const std::string &aName, const std::string aPassword, - const std::string &aEmail, Being aPlayer[ACC_MAX_CHARS]) - : name(aName), - password(aPassword), - email(aEmail) +Account::Account() { } -Account::~Account() +Account::Account(const std::string &name, const std::string &password, + const std::string &email, const std::vector<Being*> &beings): + name(name), + password(password), + email(email), + beings(beings) { } -void Account::setName(const std::string& n) +Account::~Account() { - name = n; } const std::string& Account::getName() @@ -45,23 +45,28 @@ const std::string& Account::getName() return name; } -void Account::setPassword(const std::string& p) +const std::string& Account::getPassword() { - //A hash of p needs to be made then hash stored in password - password = p; + return password; } -const std::string& Account::getPassword() +const std::string& Account::getEmail() { - return password; + return email; } -void Account::setEmail(const std::string& e) +void Account::setName(const std::string &n) { - email = e; + name = n; } -const std::string& Account::getEmail() +void Account::setPassword(const std::string &p) { - return email; + // A hash of p needs to be made then hash stored in password + password = p; +} + +void Account::setEmail(const std::string &e) +{ + email = e; } |