summaryrefslogtreecommitdiff
path: root/external/mdds
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-01-07 15:47:43 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-01-07 15:51:43 -0500
commit47a7565315dcfc4271c2b2c205225d914a1a5094 (patch)
treed78c238a83eb8cacac90543c70cfeeeff982fe67 /external/mdds
parent94227ec32e4736d4a85e4d82be195eaef5ce45f1 (diff)
Patch mdds to make available a method to empty multiple elements in one call.
This is for multi_type_matrix. Change-Id: I7b1fcf6b16b5addbb76078506536542cddede25f
Diffstat (limited to 'external/mdds')
-rw-r--r--external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch54
-rw-r--r--external/mdds/UnpackedTarball_mdds.mk1
2 files changed, 55 insertions, 0 deletions
diff --git a/external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch b/external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch
new file mode 100644
index 000000000000..c905cea5b286
--- /dev/null
+++ b/external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch
@@ -0,0 +1,54 @@
+From d0a006ad2fcabd1e785787b9a5c84b32edbab780 Mon Sep 17 00:00:00 2001
+From: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Tue, 7 Jan 2014 15:43:36 -0500
+Subject: [PATCH] Add a method to set empty to a span of elements.
+
+---
+ include/mdds/multi_type_matrix.hpp | 9 +++++++++
+ include/mdds/multi_type_matrix_def.inl | 10 ++++++++++
+ 2 files changed, 19 insertions(+)
+
+diff --git a/include/mdds/multi_type_matrix.hpp b/include/mdds/multi_type_matrix.hpp
+index a30393f..0574466 100644
+--- a/include/mdds/multi_type_matrix.hpp
++++ b/c/d/include/mdds/multi_type_matrix.hpp
+@@ -377,6 +377,15 @@ public:
+ void set_empty(size_type row, size_type col);
+
+ /**
++ * Set specified range of elements empty.
++ *
++ * @param row row position of the first element.
++ * @param col column position of the first element.
++ * @param length length of the range to set empty.
++ */
++ void set_empty(size_type row, size_type col, size_type length);
++
++ /**
+ * Set element referenced by the position object empty.
+ *
+ * @param pos position object that references element.
+diff --git a/include/mdds/multi_type_matrix_def.inl b/include/mdds/multi_type_matrix_def.inl
+index 21fe866..36f5448 100644
+--- a/include/mdds/multi_type_matrix_def.inl
++++ b/c/d/include/mdds/multi_type_matrix_def.inl
+@@ -240,6 +240,16 @@ void multi_type_matrix<_String>::set_empty(size_type row, size_type col)
+ }
+
+ template<typename _String>
++void multi_type_matrix<_String>::set_empty(size_type row, size_type col, size_type length)
++{
++ if (length == 0)
++ throw general_error("multi_type_matrix::set_empty: length of zero is not permitted.");
++
++ size_type pos1 = get_pos(row, col);
++ m_store.set_empty(pos1, pos1+length-1);
++}
++
++template<typename _String>
+ typename multi_type_matrix<_String>::position_type
+ multi_type_matrix<_String>::set_empty(const position_type& pos)
+ {
+--
+1.8.1.4
+
diff --git a/external/mdds/UnpackedTarball_mdds.mk b/external/mdds/UnpackedTarball_mdds.mk
index 1ccfc2a85f3d..6e9185b4887a 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,3))
$(eval $(call gb_UnpackedTarball_add_patches,mdds,\
external/mdds/mdds_0.6.0.patch \
external/mdds/0001-Workaround-for-an-old-gcc-bug.patch \
+ external/mdds/0001-Add-a-method-to-set-empty-to-a-span-of-elements.patch \
))
# vim: set noet sw=4 ts=4: