]> git.pld-linux.org Git - packages/mdds.git/blob - 0001-help-compiler-select-the-right-overload-of-vector-in.patch
- pl
[packages/mdds.git] / 0001-help-compiler-select-the-right-overload-of-vector-in.patch
1 From 900cbea3ec067833b4284584f6dfa5502dc36de8 Mon Sep 17 00:00:00 2001
2 From: David Tardon <dtardon@redhat.com>
3 Date: Fri, 20 Jul 2012 10:30:38 +0200
4 Subject: [PATCH] help compiler select the right overload of vector::insert
5
6 ---
7  include/mdds/multi_type_vector_def.inl | 8 ++++----
8  1 file changed, 4 insertions(+), 4 deletions(-)
9
10 diff --git a/include/mdds/multi_type_vector_def.inl b/include/mdds/multi_type_vector_def.inl
11 index 252a260..fb72070 100644
12 --- a/include/mdds/multi_type_vector_def.inl
13 +++ b/include/mdds/multi_type_vector_def.inl
14 @@ -1148,7 +1148,7 @@ void multi_type_vector<_CellBlockFunc>::insert_empty_impl(size_type row, size_ty
15  
16      // Insert two new block below the current; one for the empty block being
17      // inserted, and one for the lower part of the current non-empty block.
18 -    m_blocks.insert(m_blocks.begin()+block_index+1, 2, NULL);
19 +    m_blocks.insert(m_blocks.begin()+block_index+1, 2u, NULL);
20  
21      m_blocks[block_index+1] = new block(length);
22      m_blocks[block_index+2] = new block(size_blk_next);
23 @@ -1302,7 +1302,7 @@ void multi_type_vector<_CellBlockFunc>::insert_cells_to_middle(
24      // Insert two new blocks.
25      size_type n1 = row - start_row;
26      size_type n2 = blk->m_size - n1;
27 -    m_blocks.insert(m_blocks.begin()+block_index+1, 2, NULL);
28 +    m_blocks.insert(m_blocks.begin()+block_index+1, 2u, NULL);
29      blk->m_size = n1;
30  
31      m_blocks[block_index+1] = new block(length);
32 @@ -1467,7 +1467,7 @@ void multi_type_vector<_CellBlockFunc>::set_cells_to_single_block(
33      assert(start_row_in_block < start_row && end_row < end_row_in_block);
34  
35      // Insert two new blocks below the current one.
36 -    m_blocks.insert(m_blocks.begin()+block_index+1, 2, NULL);
37 +    m_blocks.insert(m_blocks.begin()+block_index+1, 2u, NULL);
38  
39      // first new block is for the data array being inserted.
40      size_type new_size = end_row - start_row + 1;
41 @@ -1985,7 +1985,7 @@ void multi_type_vector<_CellBlockFunc>::set_empty_in_single_block(
42  
43      // First, insert two new blocks at position past the current block.
44      size_type lower_block_size = end_row_in_block - end_row;
45 -    m_blocks.insert(m_blocks.begin()+block_index+1, 2, NULL);
46 +    m_blocks.insert(m_blocks.begin()+block_index+1, 2u, NULL);
47      m_blocks[block_index+1] = new block(empty_block_size); // empty block.
48      m_blocks[block_index+2] = new block(lower_block_size);
49  
50 -- 
51 1.7.11.2
52
This page took 0.027119 seconds and 3 git commands to generate.