Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
flagarde committed May 11, 2024
1 parent 1fcc58e commit 65dc844
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/Khaos/VersionMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,38 +41,38 @@
* #define KHAOS_DEFINE_name_VERSION_PRIVATE() SET_VERSION(2,3,4,5)
* \endcode
*/
#define SET_VERSION(major, minor, patch, tweak) ((((major)*1ULL % (1<<16)) << 48) + (((minor)*1ULL % (1<<16)) << 32) + (((patch)*1ULL % (1<<16)) << 16) + ((tweak)*1ULL % (1<<16)))
#define SET_VERSION(major, minor, patch, tweak) ((((major)*1ULL % (1<<16)) << 48) + (((minor)*1ULL % (1<<16)) << 32) + (((patch)*1ULL % (1<<16)) << 16) + ((tweak)*1ULL % (1<<16))) /* //NOSONAR */

/** \hideinitializer
* \brief Get the major version numbers.
* \param[in] name The name for which to return the corresponding major version number.
*
* \note Value can be directly used in both preprocessor and compiler expressions for comparison to other similarly defined values.
*/
#define GET_VERSION_MAJOR(version) ((((KHAOS_DEFINE_##version##_VERSION_PRIVATE()) * 1ULL) >> 48) % (1<<16)) /* //NOSONAR */
#define GET_VERSION_MAJOR(name) ((((KHAOS_DEFINE_##name##_VERSION_PRIVATE()) * 1ULL) >> 48) % (1<<16)) /* //NOSONAR */

/** \hideinitializer
* \brief Get the minor version numbers.
* \param[in] name The name for which to return the corresponding minor version number.
*
* \note Value can be directly used in both preprocessor and compiler expressions for comparison to other similarly defined values.
*/
#define GET_VERSION_MINOR(version) ((((KHAOS_DEFINE_##version##_VERSION_PRIVATE()) * 1ULL) >> 32) % (1<<16)) /* //NOSONAR */
#define GET_VERSION_MINOR(name) ((((KHAOS_DEFINE_##name##_VERSION_PRIVATE()) * 1ULL) >> 32) % (1<<16)) /* //NOSONAR */

/** \hideinitializer
* \brief Get the patch version numbers.
* \param[in]name The name for which to return the corresponding patch version number.
*
* \note Value can be directly used in both preprocessor and compiler expressions for comparison to other similarly defined values.
*/
#define GET_VERSION_PATCH(version) ((((KHAOS_DEFINE_##version##_VERSION_PRIVATE()) * 1ULL) >> 16) % (1<<16)) /* //NOSONAR */
#define GET_VERSION_PATCH(name) ((((KHAOS_DEFINE_##name##_VERSION_PRIVATE()) * 1ULL) >> 16) % (1<<16)) /* //NOSONAR */

/** \hideinitializer
* \brief Get the tweak version numbers.
* \param[in] name The name for which to return the corresponding tweak version number.
*
* \note Value can be directly used in both preprocessor and compiler expressions for comparison to other similarly defined values.
*/
#define GET_VERSION_TWEAK(version) (((KHAOS_DEFINE_##version##_VERSION_PRIVATE()) * 1ULL) % (1<<16)) /* //NOSONAR */
#define GET_VERSION_TWEAK(name) (((KHAOS_DEFINE_##name##_VERSION_PRIVATE()) * 1ULL) % (1<<16)) /* //NOSONAR */

#endif /* KHAOS_VERSIONMACROS_H_ */

0 comments on commit 65dc844

Please sign in to comment.