diff options
| author | 2013-05-20 19:25:46 +0100 | |
|---|---|---|
| committer | 2013-06-06 01:45:04 +0100 | |
| commit | ef3799a43a24f4b3da5e785765a6e4c01353845c (patch) | |
| tree | a10167540156ba49efeb195cf427fe32c9d827aa /src/users.cpp | |
| parent | Convert 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.cpp | 10 |
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; } |
