Skip to content
Snippets Groups Projects
  1. Jan 08, 2016
  2. Dec 31, 2015
  3. Dec 29, 2015
  4. Nov 13, 2015
    • Arseny Kapoulkine's avatar
      Work around MinGW versions with non-C99 compliant headers · 2cf599b3
      Arseny Kapoulkine authored
      Apparently some MinGW distributions have a compiler that's recent enough to
      support C++11 but limits.h header that incorrectly omits LLONG limits in
      strict ANSI mode, since it guards the definitions with:
      
      	#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
      
      We can just define these symbols ourselves in this specific case.
      
      Fixes #66.
      2cf599b3
  5. Oct 25, 2015
  6. Oct 19, 2015
  7. Oct 18, 2015
  8. Oct 17, 2015
  9. Oct 12, 2015
  10. Oct 10, 2015
  11. Oct 08, 2015
  12. Oct 06, 2015
  13. Sep 21, 2015
  14. Sep 20, 2015
    • Arseny Kapoulkine's avatar
      Fix signed/unsigned warnings for MSVC · 1b2c1914
      Arseny Kapoulkine authored
      1b2c1914
    • Arseny Kapoulkine's avatar
      Implement custom string to integer conversion · ec0c9c55
      Arseny Kapoulkine authored
      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.
      ec0c9c55
    • Arseny Kapoulkine's avatar
      Remove extra const from operator= declaration · bda55c81
      Arseny Kapoulkine authored
      This does not really matter too much but it's better to be consistent.
      bda55c81
    • Arseny Kapoulkine's avatar
      Inline widen_ascii to get rid of an extra strlen call · 25cce38f
      Arseny Kapoulkine authored
      Also since this function is only used once and is not defined in regular mode
      to avoid warnings this simplifies code a bit.
      25cce38f
    • Arseny Kapoulkine's avatar
      Eliminate redundant strlen calls during set_value/set · 9c539f92
      Arseny Kapoulkine authored
      Since we use manual integer conversion we know the length of the string.
      
      This makes set_value(int) ~30% faster for 4-digit numbers.
      9c539f92
    • Arseny Kapoulkine's avatar
      Force callers of strcpy_insitu to compute string length · 5750b7cc
      Arseny Kapoulkine authored
      This makes it possible to avoid calling strlen if we already know the string
      size.
      5750b7cc
    • Arseny Kapoulkine's avatar
      Implement integer to string conversion manually · 131c1a15
      Arseny Kapoulkine authored
      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.
      131c1a15
  15. Aug 14, 2015
  16. Jul 27, 2015
    • Arseny Kapoulkine's avatar
      Fix two UB sanitizer false positives · f738675f
      Arseny Kapoulkine authored
      Change the expression to reference the array element indirectly. The memory
      block can be bigger than the structure so it's invalid to use static data[]
      size for bounds checking.
      f738675f
  17. Jul 25, 2015
  18. Jul 23, 2015
Loading