1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-16 12:06:35 +01:00

core api const-correctness update

This commit is contained in:
Jfreegman
2014-07-02 17:30:31 -04:00
parent 9696acc8bd
commit 10d0e99d72
10 changed files with 67 additions and 93 deletions

View File

@@ -166,13 +166,11 @@ static void print_groupchat_help(ToxWindow *self)
}
static void groupchat_onGroupMessage(ToxWindow *self, Tox *m, int groupnum, int peernum,
uint8_t *msg, uint16_t len)
const uint8_t *msg, uint16_t len)
{
if (self->num != groupnum)
return;
msg[len] = '\0';
ChatContext *ctx = self->chatwin;
uint8_t nick[TOX_MAX_NAME_LENGTH] = {'\0'};
@@ -208,14 +206,12 @@ static void groupchat_onGroupMessage(ToxWindow *self, Tox *m, int groupnum, int
write_to_log(msg, nick, ctx->log, false);
}
static void groupchat_onGroupAction(ToxWindow *self, Tox *m, int groupnum, int peernum, uint8_t *action,
static void groupchat_onGroupAction(ToxWindow *self, Tox *m, int groupnum, int peernum, const uint8_t *action,
uint16_t len)
{
if (self->num != groupnum)
return;
action[len] = '\0';
ChatContext *ctx = self->chatwin;
/* check if message contains own name and alert appropriately */