diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-06-16 00:32:01 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-06-16 00:32:01 -0700 |
commit | b6995f06b9b60eb8df5838572572bc2e4fd953c2 (patch) | |
tree | baeed4006629b45b67036932b3744cc80e3aec3f | |
parent | bd23216420aa9b31fae6891ac267cd0ce1dddbb8 (diff) |
Fix BorlandC compilation
Rename partition to partition3 to resolve conflicts with std::partition.
-rw-r--r-- | src/pugixml.cpp | 4 | ||||
-rw-r--r-- | tests/test_xpath_functions.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 62d0711..4bc971b 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -7262,7 +7262,7 @@ PUGI__NS_BEGIN return middle; } - template <typename T, typename Pred> void partition(T* begin, T* end, T pivot, const Pred& pred, T** out_eqbeg, T** out_eqend) + template <typename T, typename Pred> void partition3(T* begin, T* end, T pivot, const Pred& pred, T** out_eqbeg, T** out_eqend) { // invariant: array is split into 4 groups: = < ? > (each variable denotes the boundary between the groups) T* eq = begin; @@ -7300,7 +7300,7 @@ PUGI__NS_BEGIN // partition in three chunks (< = >) I eqbeg, eqend; - partition(begin, end, *median, pred, &eqbeg, &eqend); + partition3(begin, end, *median, pred, &eqbeg, &eqend); // loop on larger half if (eqbeg - begin > end - eqend) diff --git a/tests/test_xpath_functions.cpp b/tests/test_xpath_functions.cpp index 480eb97..604da78 100644 --- a/tests/test_xpath_functions.cpp +++ b/tests/test_xpath_functions.cpp @@ -809,7 +809,7 @@ TEST(xpath_unknown_functions) query[0] = ch; CHECK_XPATH_FAIL(query); - query[0] = ch - 32; + query[0] = char_t(ch - 32); CHECK_XPATH_FAIL(query); } } |