Skip to content

Commit

Permalink
adopt to #2415 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Green-Sky committed Nov 13, 2023
1 parent 38e4c82 commit 75f3c33
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion other/event_tooling/generate_event_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_custom_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_custom_private_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_invite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_join_fail.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_moderation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_password.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_peer_exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_peer_join.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_peer_limit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_peer_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_peer_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_privacy_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_private_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_topic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_topic_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion toxcore/events/group_voice_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 75f3c33

Please sign in to comment.