Prefer explicit bitwise operations for modifying flags
The *_is* functions for testing for bit flags have proven useful, maybe mostly due to C's bad bitwise operator precedence, but the *_set*/*_clear* functions just add extra code without much benefit. Relying on explicit bitwise operations also lets us use the |=/&= shortcut operators, which are nice.
This commit is contained in:
@@ -155,10 +155,8 @@ enum lfs_open_flags {
|
||||
#endif
|
||||
|
||||
// internally used flags
|
||||
// TODO do we need both unflushed and unsynced?
|
||||
LFS_F_UNFLUSHED = 0x010000, // File's has data that needs to be written
|
||||
LFS_F_UNSYNCED = 0x020000, // File's metadata does not match storage
|
||||
LFS_F_ERRORED = 0x040000, // An error occurred during write
|
||||
LFS_F_UNSYNCED = 0x010000, // File's metadata does not match storage
|
||||
LFS_F_ERRORED = 0x020000, // An error occurred during write
|
||||
};
|
||||
|
||||
// File seek flags
|
||||
|
||||
Reference in New Issue
Block a user