author | skyhusker <skyhusker> | 2005-01-26 22:22:55 (UTC) |
---|---|---|
committer | skyhusker <skyhusker> | 2005-01-26 22:22:55 (UTC) |
commit | 1752010f14bb7806bae6f83b349c9896a3005c75 (patch) (unidiff) | |
tree | a43902f058fef91ed136622bb4f9964f1aa5441f /noncore/net/opieirc/ircperson.cpp | |
parent | d3ca4c7807c7a22837e481c1016c9814a68e00fb (diff) | |
download | opie-1752010f14bb7806bae6f83b349c9896a3005c75.zip opie-1752010f14bb7806bae6f83b349c9896a3005c75.tar.gz opie-1752010f14bb7806bae6f83b349c9896a3005c75.tar.bz2 |
Changed argument passing from value to const reference
Diffstat (limited to 'noncore/net/opieirc/ircperson.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircperson.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/opieirc/ircperson.cpp b/noncore/net/opieirc/ircperson.cpp index 1dd2679..f673dee 100644 --- a/noncore/net/opieirc/ircperson.cpp +++ b/noncore/net/opieirc/ircperson.cpp | |||
@@ -3,51 +3,51 @@ | |||
3 | IRCPerson::IRCPerson() { | 3 | IRCPerson::IRCPerson() { |
4 | m_nick = ""; | 4 | m_nick = ""; |
5 | m_user = ""; | 5 | m_user = ""; |
6 | m_host = ""; | 6 | m_host = ""; |
7 | } | 7 | } |
8 | 8 | ||
9 | IRCPerson::IRCPerson(const IRCPerson &person) { | 9 | IRCPerson::IRCPerson(const IRCPerson &person) { |
10 | m_nick = person.m_nick; | 10 | m_nick = person.m_nick; |
11 | m_user = person.m_user; | 11 | m_user = person.m_user; |
12 | m_host = person.m_host; | 12 | m_host = person.m_host; |
13 | } | 13 | } |
14 | 14 | ||
15 | IRCPerson::IRCPerson(QString mask) { | 15 | IRCPerson::IRCPerson(const QString &mask) { |
16 | IRCPerson(); | 16 | IRCPerson(); |
17 | fromMask(mask); | 17 | fromMask(mask); |
18 | } | 18 | } |
19 | 19 | ||
20 | void IRCPerson::fromMask(QString mask) { | 20 | void IRCPerson::fromMask(const QString &mask) { |
21 | int sep1 = mask.find("!"); | 21 | int sep1 = mask.find("!"); |
22 | int sep2 = mask.find("@"); | 22 | int sep2 = mask.find("@"); |
23 | 23 | ||
24 | m_nick = mask.left(sep1); | 24 | m_nick = mask.left(sep1); |
25 | m_user = mask.mid(sep1+1, sep2-sep1-1); | 25 | m_user = mask.mid(sep1+1, sep2-sep1-1); |
26 | m_host = mask.right(mask.length()-sep2-1); | 26 | m_host = mask.right(mask.length()-sep2-1); |
27 | } | 27 | } |
28 | 28 | ||
29 | QString IRCPerson::toMask() { | 29 | QString IRCPerson::toMask() { |
30 | return m_nick + "!" + m_user + "@" + m_host; | 30 | return m_nick + "!" + m_user + "@" + m_host; |
31 | } | 31 | } |
32 | 32 | ||
33 | void IRCPerson::setNick(QString nick) { | 33 | void IRCPerson::setNick(const QString &nick) { |
34 | m_nick = nick; | 34 | m_nick = nick; |
35 | } | 35 | } |
36 | 36 | ||
37 | void IRCPerson::setUser(QString user) { | 37 | void IRCPerson::setUser(const QString &user) { |
38 | m_user = user; | 38 | m_user = user; |
39 | } | 39 | } |
40 | 40 | ||
41 | void IRCPerson::setHost(QString host) { | 41 | void IRCPerson::setHost(const QString &host) { |
42 | m_host = host; | 42 | m_host = host; |
43 | } | 43 | } |
44 | // -- GETTER FUNCS -- | 44 | // -- GETTER FUNCS -- |
45 | QString IRCPerson::nick() { | 45 | QString IRCPerson::nick() { |
46 | return m_nick; | 46 | return m_nick; |
47 | } | 47 | } |
48 | 48 | ||
49 | QString IRCPerson::user() { | 49 | QString IRCPerson::user() { |
50 | return m_user; | 50 | return m_user; |
51 | } | 51 | } |
52 | 52 | ||
53 | QString IRCPerson::host() { | 53 | QString IRCPerson::host() { |