silnrsi / graphite

Graphite is a "smart font" system developed specifically to handle the complexities of lesser-known languages of the world.
http://graphite.sil.org/
Other
147 stars 44 forks source link

Fixed JSON preety printer for x64 build #5

Closed karol57 closed 6 years ago

karol57 commented 8 years ago

I had problems while building library using Mingw-w64, so I wrote a small patch. Fixed errors:

  1. ./src/gr_logging.cpp:170:37: error: ambiguous overload for 'operator<<' (operand types are 'graphite2::json' and 'size_t {aka long long unsigned int}')
  2. unsigned long int was treated as signed long int at ./src/json.cpp:135:95
  3. ./src/Intervals.cpp:280:17: error: ambiguous overload for 'operator<<' (operand types are 'graphite2::json' and 'ptrdiff_t {aka long long int}')

Oh, and I think it's better to remove json & operator << (integer) throw(); and all integer operators witch casts given number to json::integer, so proper (%hhd, %hhu, %hd, %hu, %d, %u, %ld, %lu) format specifiers can be used. The same with inline json & operator << (json & j, char c) throw () If you don't have any objections, tell me and I will add proper commit to this pull request.

tim-eves commented 6 years ago

This has hopefully been fixed in the Win64 building work on master and should definitely be soved in the upcomming C++ modernisation work (c++11 branch)