Created
March 24, 2016 11:53
-
-
Save 2bbb/1465ad832e765848d126 to your computer and use it in GitHub Desktop.
OFX_VERSION_MACRO
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
#pragma once | |
#include "ofConstants.h" | |
#define OFX_MAKE_OF_VERSION(major, minor, patch) (major * 10000 + minor * 100 + patch) | |
#define OFX_THIS_OF_VERSION OFX_MAKE_OF_VERSION(OF_VERSION_MAJOR, OF_VERSION_MINOR, OF_VERSION_PATCH) | |
#define OFX_THIS_OF_IS_OLDER_THAN(major, minor, patch) (OFX_OF_VERSION < OFX_MAKE_OF_VERSION(major, minor, patch)) | |
#define OFX_THIS_OF_IS_OLDER_THAN_EQ(major, minor, patch) (OFX_OF_VERSION <= OFX_MAKE_OF_VERSION(major, minor, patch)) | |
#define OFX_THIS_OF_IS_NEWER_THAN(major, minor, patch) (OFX_MAKE_OF_VERSION(major, minor, patch) < OFX_OF_VERSION) | |
#define OFX_THIS_OF_IS_NEWER_THAN_EQ(major, minor, patch) (OFX_MAKE_OF_VERSION(major, minor, patch) <= OFX_OF_VERSION) | |
// ex. | |
#define IS_THREAD_CHANNEL_MOVE_CORRECT OFX_THIS_OF_IS_NEWER_THAN(0, 9, 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment