From b541c3595fa857ac60c6693b4d066309a10bcd1b Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Fri, 30 Aug 2019 16:30:28 +0200 Subject: [PATCH] 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. --- include/mapnik/version.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/mapnik/version.hpp b/include/mapnik/version.hpp index 8f52e2bfe..b25e8fee3 100644 --- a/include/mapnik/version.hpp +++ b/include/mapnik/version.hpp @@ -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