diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-18 13:35:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-19 15:12:20 +0300 |
commit | 93458052fe1c44e1ecca7a29abc5304f626120ac (patch) | |
tree | 0c1afb710a37df2b43524c72389069f10eca1d2c | |
parent | e994c01cab6fc45e54396641c5fd9fa509cfe0d6 (diff) | |
download | ManaVerse-93458052fe1c44e1ecca7a29abc5304f626120ac.tar.gz ManaVerse-93458052fe1c44e1ecca7a29abc5304f626120ac.tar.bz2 ManaVerse-93458052fe1c44e1ecca7a29abc5304f626120ac.tar.xz ManaVerse-93458052fe1c44e1ecca7a29abc5304f626120ac.zip |
in guild fix a bit getmember code.
-rw-r--r-- | src/guild.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/guild.cpp b/src/guild.cpp index 12fbe78a4..6b0e5ec2d 100644 --- a/src/guild.cpp +++ b/src/guild.cpp @@ -98,8 +98,8 @@ Guild::~Guild() GuildMember *Guild::addMember(const int accountId, const int charId, const std::string &name) { - GuildMember *m; - if ((m = getMember(accountId, charId))) + GuildMember *m = getMember(accountId, charId); + if (m) return m; m = new GuildMember(this, accountId, charId, name); @@ -111,8 +111,8 @@ GuildMember *Guild::addMember(const int accountId, const int charId, GuildMember *Guild::addMember(const std::string &name) { - GuildMember *m; - if ((m = getMember(name))) + GuildMember *m = getMember(name); + if (m) return m; m = new GuildMember(this, name); |