mirror of
https://github.com/cculianu/Fulcrum.git
synced 2026-08-13 12:33:27 +02:00
- JSON Number parse was needlessly pushing 1 character at a time to the output QByteArray. We instead just accept characters until the end of token, then push the entire token as 1 call. This avoids extra mallocs and extra function calls. - Fixed a bug where the parser would accept bare "-" by itself as if it were a number, but then fail later. - Optimized some expressions slightly. - Fixed some read-past-end-of-buffer bugs (in practice would not have caused problems since they would technically be reading the NUL byte). - Added more tests for corner cases (such as the '-' situation described above). - Made the Json_Parser.cpp "Container" struct store the parsed QByteArray directly rather than it being wastefully wrapped by a QVariant. - Added a note-to-self about why we didn't use a union class (it bought us no performance to do so and it just added boilerplate code). Maybe in the future when we have std::variant on all compilers we target that may be a decent alternative.
2 lines
8 B
JSON
2 lines
8 B
JSON
1.3e+0
|
|
|