[mdds] fix another breaker

David Tardon dtardon at fedoraproject.org
Sat Jul 28 07:03:08 UTC 2012


commit 909bf1191fe3de12517dba83cfaaf81ed767ea88
Author: David Tardon <dtardon at redhat.com>
Date:   Sat Jul 28 09:02:38 2012 +0200

    fix another breaker

 ...er-select-the-right-overload-of-vector-in.patch |   52 ++++++++++++++++++++
 mdds.spec                                          |    2 +
 2 files changed, 54 insertions(+), 0 deletions(-)
---
diff --git a/0001-help-compiler-select-the-right-overload-of-vector-in.patch b/0001-help-compiler-select-the-right-overload-of-vector-in.patch
new file mode 100644
index 0000000..03cf1c3
--- /dev/null
+++ b/0001-help-compiler-select-the-right-overload-of-vector-in.patch
@@ -0,0 +1,52 @@
+From 900cbea3ec067833b4284584f6dfa5502dc36de8 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Fri, 20 Jul 2012 10:30:38 +0200
+Subject: [PATCH] help compiler select the right overload of vector::insert
+
+---
+ include/mdds/multi_type_vector_def.inl | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/include/mdds/multi_type_vector_def.inl b/include/mdds/multi_type_vector_def.inl
+index 252a260..fb72070 100644
+--- a/include/mdds/multi_type_vector_def.inl
++++ b/include/mdds/multi_type_vector_def.inl
+@@ -1148,7 +1148,7 @@ void multi_type_vector<_CellBlockFunc>::insert_empty_impl(size_type row, size_ty
+ 
+     // Insert two new block below the current; one for the empty block being
+     // inserted, and one for the lower part of the current non-empty block.
+-    m_blocks.insert(m_blocks.begin()+block_index+1, 2, NULL);
++    m_blocks.insert(m_blocks.begin()+block_index+1, 2u, NULL);
+ 
+     m_blocks[block_index+1] = new block(length);
+     m_blocks[block_index+2] = new block(size_blk_next);
+@@ -1302,7 +1302,7 @@ void multi_type_vector<_CellBlockFunc>::insert_cells_to_middle(
+     // Insert two new blocks.
+     size_type n1 = row - start_row;
+     size_type n2 = blk->m_size - n1;
+-    m_blocks.insert(m_blocks.begin()+block_index+1, 2, NULL);
++    m_blocks.insert(m_blocks.begin()+block_index+1, 2u, NULL);
+     blk->m_size = n1;
+ 
+     m_blocks[block_index+1] = new block(length);
+@@ -1467,7 +1467,7 @@ void multi_type_vector<_CellBlockFunc>::set_cells_to_single_block(
+     assert(start_row_in_block < start_row && end_row < end_row_in_block);
+ 
+     // Insert two new blocks below the current one.
+-    m_blocks.insert(m_blocks.begin()+block_index+1, 2, NULL);
++    m_blocks.insert(m_blocks.begin()+block_index+1, 2u, NULL);
+ 
+     // first new block is for the data array being inserted.
+     size_type new_size = end_row - start_row + 1;
+@@ -1985,7 +1985,7 @@ void multi_type_vector<_CellBlockFunc>::set_empty_in_single_block(
+ 
+     // First, insert two new blocks at position past the current block.
+     size_type lower_block_size = end_row_in_block - end_row;
+-    m_blocks.insert(m_blocks.begin()+block_index+1, 2, NULL);
++    m_blocks.insert(m_blocks.begin()+block_index+1, 2u, NULL);
+     m_blocks[block_index+1] = new block(empty_block_size); // empty block.
+     m_blocks[block_index+2] = new block(lower_block_size);
+ 
+-- 
+1.7.11.2
+
diff --git a/mdds.spec b/mdds.spec
index c281f70..4fe09a4 100644
--- a/mdds.spec
+++ b/mdds.spec
@@ -8,6 +8,7 @@ License: MIT
 URL: http://code.google.com/p/multidimalgorithm/
 Source0: http://multidimalgorithm.googlecode.com/files/%{name}_%{version}.tar.bz2
 Patch0: 0001-Fixes-build-breakage-on-Debian.patch
+Patch1: 0001-help-compiler-select-the-right-overload-of-vector-in.patch
 
 BuildRequires: boost-devel
 
@@ -38,6 +39,7 @@ Headers for %{name}.
 %prep
 %setup -q -n %{name}_%{version}
 %patch0 -p1
+%patch1 -p1
 # this is only used in tests
 sed -i -e '/^CPPFLAGS/s/-Wall.*-std/%{optflags} -std/' Makefile.in
 


More information about the scm-commits mailing list