Merge commit 'cdc4284cb50041b5bf7d476561085d629292e456'
This commit is contained in:
commit
bedbacddde
@ -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 << " Tox_Event_" << event_name << " *event, Bin_Unpack *bu)\n{\n";
|
||||||
f << " assert(event != nullptr);\n";
|
f << " assert(event != nullptr);\n";
|
||||||
if (event_types.size() > 1) {
|
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;
|
bool first = true;
|
||||||
|
@ -120,7 +120,7 @@ static bool tox_event_group_custom_packet_unpack(
|
|||||||
Tox_Event_Group_Custom_Packet *event, Bin_Unpack *bu)
|
Tox_Event_Group_Custom_Packet *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||||
return false;
|
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)
|
Tox_Event_Group_Custom_Private_Packet *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ static bool tox_event_group_invite_unpack(
|
|||||||
Tox_Event_Group_Invite *event, Bin_Unpack *bu)
|
Tox_Event_Group_Invite *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_join_fail_unpack(
|
|||||||
Tox_Event_Group_Join_Fail *event, Bin_Unpack *bu)
|
Tox_Event_Group_Join_Fail *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ static bool tox_event_group_message_unpack(
|
|||||||
Tox_Event_Group_Message *event, Bin_Unpack *bu)
|
Tox_Event_Group_Message *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 5)) {
|
if (!bin_unpack_array_fixed(bu, 5, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ static bool tox_event_group_moderation_unpack(
|
|||||||
Tox_Event_Group_Moderation *event, Bin_Unpack *bu)
|
Tox_Event_Group_Moderation *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 4)) {
|
if (!bin_unpack_array_fixed(bu, 4, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ static bool tox_event_group_password_unpack(
|
|||||||
Tox_Event_Group_Password *event, Bin_Unpack *bu)
|
Tox_Event_Group_Password *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ static bool tox_event_group_peer_exit_unpack(
|
|||||||
Tox_Event_Group_Peer_Exit *event, Bin_Unpack *bu)
|
Tox_Event_Group_Peer_Exit *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 5)) {
|
if (!bin_unpack_array_fixed(bu, 5, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_peer_join_unpack(
|
|||||||
Tox_Event_Group_Peer_Join *event, Bin_Unpack *bu)
|
Tox_Event_Group_Peer_Join *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_peer_limit_unpack(
|
|||||||
Tox_Event_Group_Peer_Limit *event, Bin_Unpack *bu)
|
Tox_Event_Group_Peer_Limit *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ static bool tox_event_group_peer_name_unpack(
|
|||||||
Tox_Event_Group_Peer_Name *event, Bin_Unpack *bu)
|
Tox_Event_Group_Peer_Name *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ static bool tox_event_group_peer_status_unpack(
|
|||||||
Tox_Event_Group_Peer_Status *event, Bin_Unpack *bu)
|
Tox_Event_Group_Peer_Status *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_privacy_state_unpack(
|
|||||||
Tox_Event_Group_Privacy_State *event, Bin_Unpack *bu)
|
Tox_Event_Group_Privacy_State *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ static bool tox_event_group_private_message_unpack(
|
|||||||
Tox_Event_Group_Private_Message *event, Bin_Unpack *bu)
|
Tox_Event_Group_Private_Message *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 4)) {
|
if (!bin_unpack_array_fixed(bu, 4, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ static bool tox_event_group_topic_unpack(
|
|||||||
Tox_Event_Group_Topic *event, Bin_Unpack *bu)
|
Tox_Event_Group_Topic *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 3)) {
|
if (!bin_unpack_array_fixed(bu, 3, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_topic_lock_unpack(
|
|||||||
Tox_Event_Group_Topic_Lock *event, Bin_Unpack *bu)
|
Tox_Event_Group_Topic_Lock *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ static bool tox_event_group_voice_state_unpack(
|
|||||||
Tox_Event_Group_Voice_State *event, Bin_Unpack *bu)
|
Tox_Event_Group_Voice_State *event, Bin_Unpack *bu)
|
||||||
{
|
{
|
||||||
assert(event != nullptr);
|
assert(event != nullptr);
|
||||||
if (!bin_unpack_array_fixed(bu, 2)) {
|
if (!bin_unpack_array_fixed(bu, 2, nullptr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user