fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / mdds / 0001-another-step-to-allow-fst-to-use-any-value-type.patch.1
blobbed9c9cb750c2d1d3e7606d38d283dce42bee45b
1 From 5fc9214fb94595e1a2c0b9e0285037f5a2fa59bf Mon Sep 17 00:00:00 2001
2 From: David Tardon <dtardon@redhat.com>
3 Date: Mon, 29 Jun 2015 14:28:42 +0200
4 Subject: [PATCH] another step to allow fst to use any value type
6 For some reason this is not a problem on modern compilers...
7 ---
8  include/mdds/flat_segment_tree.hpp     | 1 -
9  include/mdds/flat_segment_tree_def.inl | 2 +-
10  src/flat_segment_tree_test.cpp         | 4 ++++
11  3 files changed, 5 insertions(+), 2 deletions(-)
13 diff --git a/include/mdds/flat_segment_tree.hpp b/include/mdds/flat_segment_tree.hpp
14 index b656bc3..02cf87e 100644
15 --- a/include/mdds/flat_segment_tree.hpp
16 +++ b/include/mdds/flat_segment_tree.hpp
17 @@ -32,7 +32,6 @@
18  #include <sstream>
19  #include <utility>
20  #include <cassert>
21 -#include <limits>
23  #include "mdds/node.hpp"
24  #include "mdds/flat_segment_tree_itr.hpp"
25 diff --git a/include/mdds/flat_segment_tree_def.inl b/include/mdds/flat_segment_tree_def.inl
26 index ebfee99..5fef1c3 100644
27 --- a/include/mdds/flat_segment_tree_def.inl
28 +++ b/include/mdds/flat_segment_tree_def.inl
29 @@ -46,7 +46,7 @@ flat_segment_tree<_Key, _Value>::flat_segment_tree(key_type min_val, key_type ma
30      // We don't ever use the value of the right leaf node, but we need the
31      // value to be always the same, to make it easier to check for
32      // equality.
33 -    m_right_leaf->value_leaf.value = ::std::numeric_limits<value_type>::max();
34 +    m_right_leaf->value_leaf.value = init_val;
35  }
37  template<typename _Key, typename _Value>
38 diff --git a/src/flat_segment_tree_test.cpp b/src/flat_segment_tree_test.cpp
39 index 81858f5..f7aead7 100644
40 --- a/src/flat_segment_tree_test.cpp
41 +++ b/src/flat_segment_tree_test.cpp
42 @@ -1943,6 +1943,10 @@ void fst_test_non_numeric_value()
43      db.search(1, result);
45      assert(result == "hello world");
47 +    db_type db2(db);
49 +    assert(db == db2);
50  }
52  void fst_test_non_numeric_key()
53 -- 
54 2.4.2