aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2013-05-20 19:25:46 +0100
committerGravatar Peter Powell2013-06-06 01:45:04 +0100
commitef3799a43a24f4b3da5e785765a6e4c01353845c (patch)
treea10167540156ba49efeb195cf427fe32c9d827aa /src/users.cpp
parentConvert ConvNumeric() to use std::string instead of char[MAXBUF]. (diff)
Convert User::FormatNoticeMasks() to use std::string.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/users.cpp b/src/users.cpp
index a8359692a..e0d420311 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -122,18 +122,16 @@ void User::SetNoticeMask(unsigned char sm, bool value)
snomasks[sm-65] = value;
}
-const char* User::FormatNoticeMasks()
+std::string User::FormatNoticeMasks()
{
- static char data[MAXBUF];
- int offset = 0;
+ std::string data;
- for (int n = 0; n < 64; n++)
+ for (unsigned char n = 0; n < 64; n++)
{
if (snomasks[n])
- data[offset++] = n+65;
+ data.push_back(n + 65);
}
- data[offset] = 0;
return data;
}