mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Typing: Changed all return values to int for consistency and the -1 error.
This commit is contained in:
parent
00f38c8deb
commit
32afb6b1e4
|
@ -632,7 +632,7 @@ int m_set_usertyping(Messenger *m, int friendnumber, uint8_t is_typing)
|
|||
return 0;
|
||||
}
|
||||
|
||||
uint8_t m_get_istyping(Messenger *m, int friendnumber)
|
||||
int m_get_istyping(Messenger *m, int friendnumber)
|
||||
{
|
||||
if (friend_not_valid(m, friendnumber))
|
||||
return -1;
|
||||
|
|
|
@ -417,7 +417,7 @@ int m_set_usertyping(Messenger *m, int friendnumber, uint8_t is_typing);
|
|||
* returns 0 if friend is not typing.
|
||||
* returns 1 if friend is typing.
|
||||
*/
|
||||
uint8_t m_get_istyping(Messenger *m, int friendnumber);
|
||||
int m_get_istyping(Messenger *m, int friendnumber);
|
||||
|
||||
/* Sets whether we send read receipts for friendnumber.
|
||||
* This function is not lazy, and it will fail if yesno is not (0 or 1).
|
||||
|
|
|
@ -279,7 +279,7 @@ TOX_USERSTATUS tox_get_self_user_status(Tox *tox)
|
|||
int tox_set_user_is_typing(Tox *tox, int friendnumber, uint8_t is_typing)
|
||||
{
|
||||
Messenger *m = tox;
|
||||
return (int)m_set_usertyping(m, friendnumber, is_typing);
|
||||
return m_set_usertyping(m, friendnumber, is_typing);
|
||||
}
|
||||
|
||||
/* Get the typing status of a friend.
|
||||
|
@ -290,7 +290,7 @@ int tox_set_user_is_typing(Tox *tox, int friendnumber, uint8_t is_typing)
|
|||
int tox_get_is_typing(Tox *tox, int friendnumber)
|
||||
{
|
||||
Messenger *m = tox;
|
||||
return (int)m_get_istyping(m, friendnumber);
|
||||
return m_get_istyping(m, friendnumber);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user