Kaydet (Commit) 0b4d0c87 authored tarafından Kohei Yoshida's avatar Kohei Yoshida Kaydeden (comit) Kohei Yoshida

Update mdds to 1.3.1.

This newer version incorporates the change in ofz-4048.patch.1.

Change-Id: Iaccbf2694bbd752f9949c491219aa5ab8caa45fe
Reviewed-on: https://gerrit.libreoffice.org/44615Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
üst 4b63977c
......@@ -152,8 +152,8 @@ export LPSOLVE_SHA256SUM := 171816288f14215c69e730f7a4f1c325739873e21f946ff83884
export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
export MARIADB_CONNECTOR_C_SHA256SUM := fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60
export MARIADB_CONNECTOR_C_TARBALL := a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz
export MDDS_SHA256SUM := 00aa92a28af9f1168a8e5c38e46f311abb65ef5b113ef56078ff104b94211460
export MDDS_TARBALL := mdds-1.3.0.tar.bz2
export MDDS_SHA256SUM := dcb8cd2425567a5a5ec164afea475bce57784bca3e352ad4cbdd3d1a7e08e5a1
export MDDS_TARBALL := mdds-1.3.1.tar.bz2
export MDNSRESPONDER_SHA256SUM := 4737cb51378377e11d0edb7bcdd1bec79cbdaa7b27ea09c13e3006e58f8d92c0
export MDNSRESPONDER_TARBALL := mDNSResponder-576.30.4.tar.gz
export MSPUB_SHA256SUM := 26d488527ffbb0b41686d4bab756e3e6aaeb99f88adeb169d0c16d2cde96859a
......
......@@ -14,7 +14,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
$(eval $(call gb_UnpackedTarball_add_patches,mdds,\
external/mdds/ofz-4048.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/include/mdds/flat_segment_tree_def.inl b/include/mdds/flat_segment_tree_def.inl
index 58de366..00cc1c6 100644
--- a/include/mdds/flat_segment_tree_def.inl
+++ b/include/mdds/flat_segment_tree_def.inl
@@ -778,7 +778,7 @@ bool flat_segment_tree<_Key, _Value>::adjust_segment_range(key_type& start_key,
// Invalid order of segment range.
return false;
- if (end_key < m_left_leaf->value_leaf.key || start_key > m_right_leaf->value_leaf.key)
+ if (end_key < m_left_leaf->value_leaf.key || start_key >= m_right_leaf->value_leaf.key)
// The new segment does not overlap the current interval.
return false;
diff --git a/src/flat_segment_tree_test.cpp b/src/flat_segment_tree_test.cpp
index bb29918..b94f0fd 100644
--- a/src/flat_segment_tree_test.cpp
+++ b/src/flat_segment_tree_test.cpp
@@ -1986,6 +1986,22 @@ void fst_test_insert_out_of_bound()
pos = ret.first;
}
+void fst_test_insert_out_of_bound_2()
+{
+ stack_printer __stack_printer__("::fst_test_insert_out_of_bound_2");
+
+ typedef flat_segment_tree<int, bool> db_type;
+ db_type db(0, 256, false);
+
+ // The range is entirely out-of-bound, but the start range equals the
+ // upper bound of the valid range.
+ auto ret = db.insert_back(256, 1024, true);
+
+ // Insertion never took place.
+ assert(ret.first == db.end());
+ assert(!ret.second);
+}
+
void fst_test_segment_iterator()
{
stack_printer __stack_printer__("::fst_test_segment_iterator");
@@ -2115,6 +2131,7 @@ int main (int argc, char **argv)
fst_test_assignment();
fst_test_non_numeric_value();
fst_test_insert_out_of_bound();
+ fst_test_insert_out_of_bound_2();
fst_test_segment_iterator();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment