Mercurial > hg > piper-cpp
diff vamp-support/PluginHandleMapper.h @ 265:7ada63fe1084
Some neatening
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Fri, 12 Oct 2018 22:18:37 +0100 |
parents | 427c4c725085 |
children | 8c8b5fe47b33 |
line wrap: on
line diff
--- a/vamp-support/PluginHandleMapper.h Fri Oct 12 11:12:25 2018 +0100 +++ b/vamp-support/PluginHandleMapper.h Fri Oct 12 22:18:37 2018 +0100 @@ -60,7 +60,14 @@ class PluginHandleMapper { public: - typedef uint32_t Handle; // unsigned to avoid undefined behaviour on possible wrap + /** + * The handle type. This is 32-bit rather than 64-bit in order to + * be representable as a JSON number without rounding, and is + * unsigned to avoid C++ undefined behaviour in places where it + * could wrap around. + */ + typedef uint32_t Handle; + const Handle INVALID_HANDLE = 0; virtual ~PluginHandleMapper() noexcept { }