Age | Commit message (Collapse) | Author |
|
|
|
It now also moves parse result.
|
|
Only happens on GCC 3.4 for some reason.
|
|
Fix "this decimal constant is unsigned only in ISO C90".
|
|
|
|
name_sentry dtor results in multiple symbol definition errors in MSVC6.
|
|
Since they don't contribute to the resulting value just skip them before
parsing. This matches the behavior of strtol/strtoll and results in more
intuitive behavior.
|
|
Node type enum is not used as an array index anywhere else; the code is not
very readable and the value of this "optimization" is questionable.
The conditions are arranged so that in all normal cases the first comparison
returns true anyway.
|
|
The minneg argument is supposed to be the absolute value of the minimum negative
representable number. In case of two-complement arithmetic, it's the same as the
value itself but it's better to be explicit and negate the argument.
|
|
|
|
|
|
Share the implementation for different encodings. We still need two functions
because endian_swap on uint8_t is ambiguous...
|
|
|
|
|
|
|
|
This avoids linker warning when building the final executable and we don't
have to package the .PDB file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Move pugixml project file for VS2015 to scripts/ and unify the output file
structure similar to old VS201x projects. Remove test projects and solution
since they are not required for building.
Provide more accurate information in the package script and handle build
errors during package construction properly.
|
|
|
|
|
|
Instead of functions with different names (e.g. decode_utf8_block), split
utf_decoder class into multiple classes with ::process static function.
This makes it easier to share code for decoding different encodings.
|
|
|
|
This does not affect correctness but makes code more uniform.
|
|
Make sure the looping structure is the same as in decode_utf8_block.
|
|
Instead of calling xml_document public functions just call implementation of
load_buffer_inplace_own. This makes it so we only call reset() once during
load_file/load.
|
|
|
|
|
|
|
|
This makes sure we get linking errors whenever a symbol is not marked as inline
in header-only mode.
|
|
Fixed missing PUGI__FN
|
|
|
|
We now make sure that in CMake builds we have long long support. This requires
CMake 3.1 for target_compile_features.
Fixes #53 (as long as packages use this CMake script... most of them do)
|
|
This matches the format strtol supports.
|
|
Add OSX to Travis CI config
|
|
We don't need to test gcc on OSX
|
|
|
|
|
|
These tests are only testing attribute as_int in hopes that xml_text uses the
same underlying implementation (which it does).
|
|
This makes conversion significantly faster and removes more CRT dependencies;
in particular, to support long long pugixml only requires the type itself (and
the division operator...).
New implementation is up to 3x faster on short decimal numbers.
Note that unlike the old implementation, new implementation correctly handles
overflow and underflow and clamps the value to the representable range. This
means that there are some behavior changes - e.g. previously as_uint on "-1"
would return INT_MAX instead of 0.
In addition to CRT issues, for platforms with 64-bit long old implementation
incorrectly truncated from long to int or unsigned int, so even if CRT clamped
the values the result would have been incorrect.
|
|
This does not really matter too much but it's better to be consistent.
|
|
Also since this function is only used once and is not defined in regular mode
to avoid warnings this simplifies code a bit.
|
|
Since we use manual integer conversion we know the length of the string.
This makes set_value(int) ~30% faster for 4-digit numbers.
|
|
This makes it possible to avoid calling strlen if we already know the string
size.
|
|
This reduces the amount of non-standard C++ functionality pugixml may be using
by avoiding sprintf with %lld; additionally this implementation is significantly
faster (4-5x) than sprintf, mostly due to avoiding format string parsing and
stream setup that commonly happens in CRT implementations.
This comes at the expense of requiring long long division/remainder operations
if PUGIXML_USE_LONG_LONG is defined which will surely bite me one day.
|
|
They were still using Windows EOL by mistake
|