billyquith / ponder

C++ reflection library with Lua binding, and JSON and XML serialisation.
http://billyquith.github.io/ponder/
Other
640 stars 93 forks source link

int value conversion for hex #52

Closed vms1966 closed 7 years ago

vms1966 commented 7 years ago

Hi all, I suggest a small enhancement which adds support for calling functions with hex or oct arguments, in using the std::stol function for that, by just changing the call in line 64 to std::stol(from.c_str(),0,0), the third argument defines the base (default 10, 0 means interpreting strings with prefix 0x or 0X as hex and prefix 0 as octal). Best, and thanks Billy for starting and maintaining this very useful library Mat

billyquith commented 7 years ago

How a about providing a pull request! Then you'd get a contrib recognition! 🍻

EDIT: I know it looks a trivial change but I'd also expect unit tests as well.

Actually I'm working on v2 (which is taking all my time). Quite a lot of changes. Trying to get rid of a few "warts" from the existing system. Taking a bit longer than anticipated. The change above won't affect this. I'm pruning some of the stuff which I can't see a use for and trying to simplify some other bits. Quite hard refactoring a piece of code of this complexity so some bits need reworking. Perhaps I should start a ticket asking what people are using Ponder for. After this work I'm going to have to get stuck into my own project as I'm way behind schedule.