Squashed 'external/toxcore/c-toxcore/' changes from 38e4c82fe0..75f3c33943
75f3c33943 adopt to #2415 changes git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 75f3c33943cd3e249cfab3dab122aa4bbb9eec9a
This commit is contained in:
parent
32a8dba185
commit
cdc4284cb5
@ -306,7 +306,7 @@ void generate_event_impl(const std::string& event_name, std::vector<EventType> e
|
||||
f << " Tox_Event_" << event_name << " *event, Bin_Unpack *bu)\n{\n";
|
||||
f << " assert(event != nullptr);\n";
|
||||
if (event_types.size() > 1) {
|
||||
f << " if (!bin_unpack_array_fixed(bu, " << event_types.size() << ")) {\n return false;\n }\n\n";
|
||||
f << " if (!bin_unpack_array_fixed(bu, " << event_types.size() << ", nullptr)) {\n return false;\n }\n\n";
|
||||
}
|
||||
|
||||
bool first = true;
|
||||
|
@ -120,7 +120,7 @@ static bool tox_event_group_custom_packet_unpack(
|
||||
Tox_Event_Group_Custom_Packet *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
||||
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ static bool tox_event_group_custom_private_packet_unpack(
|
||||
Tox_Event_Group_Custom_Private_Packet *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
||||
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ static bool tox_event_group_invite_unpack(
|
||||
Tox_Event_Group_Invite *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
||||
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_join_fail_unpack(
|
||||
Tox_Event_Group_Join_Fail *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
||||
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ static bool tox_event_group_message_unpack(
|
||||
Tox_Event_Group_Message *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 5)) {
|
||||
if (!bin_unpack_array_fixed(bu, 5, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ static bool tox_event_group_moderation_unpack(
|
||||
Tox_Event_Group_Moderation *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 4)) {
|
||||
if (!bin_unpack_array_fixed(bu, 4, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ static bool tox_event_group_password_unpack(
|
||||
Tox_Event_Group_Password *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
||||
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ static bool tox_event_group_peer_exit_unpack(
|
||||
Tox_Event_Group_Peer_Exit *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 5)) {
|
||||
if (!bin_unpack_array_fixed(bu, 5, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_peer_join_unpack(
|
||||
Tox_Event_Group_Peer_Join *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
||||
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_peer_limit_unpack(
|
||||
Tox_Event_Group_Peer_Limit *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
||||
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ static bool tox_event_group_peer_name_unpack(
|
||||
Tox_Event_Group_Peer_Name *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
||||
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ static bool tox_event_group_peer_status_unpack(
|
||||
Tox_Event_Group_Peer_Status *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
||||
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_privacy_state_unpack(
|
||||
Tox_Event_Group_Privacy_State *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
||||
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ static bool tox_event_group_private_message_unpack(
|
||||
Tox_Event_Group_Private_Message *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 4)) {
|
||||
if (!bin_unpack_array_fixed(bu, 4, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ static bool tox_event_group_topic_unpack(
|
||||
Tox_Event_Group_Topic *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
||||
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_topic_lock_unpack(
|
||||
Tox_Event_Group_Topic_Lock *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
||||
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_voice_state_unpack(
|
||||
Tox_Event_Group_Voice_State *event, Bin_Unpack *bu)
|
||||
{
|
||||
assert(event != nullptr);
|
||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
||||
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user