-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not define AVIF_ENABLE_NODISCARD for avif.h
Redefine the AVIF_ENABLE_NODISCARD cmake option to request rather than require the AVIF_NODISCARD macro be defined as [[nodiscard]]. There are two reasons: 1. The CMAKE_C_STANDARD variable merely requests the given version of the C standard. If the compiler doesn't support the requested version of the C standard, it "decays" to a previous version of the C standard. Making avif.h use [[nodiscard]] in this case will result in compilation errors. 2. In general avif.h should only test compiler predefined macros. The only exception is AVIF_DLL (ignoring the experimental feature macros.)
- Loading branch information
1 parent
39cf485
commit a4654aa
Showing
2 changed files
with
11 additions
and
20 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
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