rename MAPNIK_MAKE_VERSION to MAPNIK_VERSION_ENCODE

Both forms can be seen in various other libraries. However, I think that
macro names with common prefix serving as substitute for namespace are
the better convention. MAPNIK_MAKE_VERSION hasn't appeared in any Mapnik
release yet, so this shouldn't break anything.

I'm not renaming other MAPNIK_*_VERSION defines that don't have the same
prefix simply because they've been there for ages, so renaming those now
might break stuff outside of Mapnik.
This commit is contained in:
Mickey Rose 2019-08-30 16:30:28 +02:00
parent 65d2d9d188
commit b541c3595f

View file

@ -29,18 +29,18 @@
#define MAPNIK_MINOR_VERSION 0
#define MAPNIK_PATCH_VERSION 0
#define MAPNIK_VERSION MAPNIK_MAKE_VERSION(MAPNIK_MAJOR_VERSION, \
MAPNIK_MINOR_VERSION, \
MAPNIK_PATCH_VERSION)
#define MAPNIK_VERSION MAPNIK_VERSION_ENCODE(MAPNIK_MAJOR_VERSION, \
MAPNIK_MINOR_VERSION, \
MAPNIK_PATCH_VERSION)
#define MAPNIK_VERSION_STRING MAPNIK_STRINGIFY(MAPNIK_MAJOR_VERSION) "." \
MAPNIK_STRINGIFY(MAPNIK_MINOR_VERSION) "." \
MAPNIK_STRINGIFY(MAPNIK_PATCH_VERSION)
#define MAPNIK_VERSION_AT_LEAST(major, minor, patch) \
(MAPNIK_VERSION >= MAPNIK_MAKE_VERSION(major, minor, patch))
(MAPNIK_VERSION >= MAPNIK_VERSION_ENCODE(major, minor, patch))
#define MAPNIK_MAKE_VERSION(major, minor, patch) \
#define MAPNIK_VERSION_ENCODE(major, minor, patch) \
((major) * 100000 + (minor) * 100 + (patch))
#endif // MAPNIK_VERSION_HPP