Firstly evaluated that assert, it's benign as far as I can tell. A hangover from an earlier way of getting data to/from the patch when I used to pass the GeoPatches pointer around with the request.
It did lead me to a couple of cases though where things weren't being cleaned up if finding a GeoSphere or GeoPatch should fail.
Also I've added some more sanity checking.
warning fix: make explicit to_string overloads for different integer sizes

This fixes a -Wsign-promo warning when using to_string on a Uint8
(which would automatically be converted to an int/int32_t)
Include WinMath for asinh
Merge remote-tracking branch 'fluffyfreak/Fix2262'