forked from notsecure/uTox
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split MESSAGE->flags field into author and msg_type
Previously it consisted of authorship bit in the lowest position, followed by a couple of bits indicating one of 4 message types (text, action, image, file). This led to more magic numbers, bit twiddling, and arithmetic hacks, than is reasonable by any measure. Since MESSAGE struct doesn't seem to be format-restricted (e.g. on-disk format), this field is removed and replaced with two straightforward ones, and the 4 types are properly encoded as an enum. Additionally TOX_FILE_OUT_PAUSE & Co. are now referred directly instead of arithmetically too. The end result is cleaner code and some comparison/signedness warnings fixed.
- Loading branch information
Showing
9 changed files
with
121 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.