Squashed 'external/toxcore/c-toxcore/' changes from b03b571272..3e05824b80

3e05824b80 refactor: Rename `out` parameters to `out_$something`.
0199c0f17f cleanup: apply the same scheme to types
aebbfabe26 cleanup: event length naming inconsistencies
2457125aa8 cleanup: align group send err enum order

git-subtree-dir: external/toxcore/c-toxcore
git-subtree-split: 3e05824b80eb9bee33e8254cba0780d84c522182
This commit is contained in:
2024-03-11 11:34:13 +01:00
parent aae086cc65
commit a5093c4aa3
20 changed files with 203 additions and 199 deletions

View File

@ -26,46 +26,46 @@
#include "network.h"
#include "util.h"
bool group_privacy_state_from_int(uint8_t value, Group_Privacy_State *out)
bool group_privacy_state_from_int(uint8_t value, Group_Privacy_State *out_enum)
{
switch (value) {
case GI_PUBLIC: {
*out = GI_PUBLIC;
*out_enum = GI_PUBLIC;
return true;
}
case GI_PRIVATE: {
*out = GI_PRIVATE;
*out_enum = GI_PRIVATE;
return true;
}
default: {
*out = GI_PUBLIC;
*out_enum = GI_PUBLIC;
return false;
}
}
}
bool group_voice_state_from_int(uint8_t value, Group_Voice_State *out)
bool group_voice_state_from_int(uint8_t value, Group_Voice_State *out_enum)
{
switch (value) {
case GV_ALL: {
*out = GV_ALL;
*out_enum = GV_ALL;
return true;
}
case GV_MODS: {
*out = GV_MODS;
*out_enum = GV_MODS;
return true;
}
case GV_FOUNDER: {
*out = GV_FOUNDER;
*out_enum = GV_FOUNDER;
return true;
}
default: {
*out = GV_ALL;
*out_enum = GV_ALL;
return false;
}
}