Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: compiled/IntMap.h

Issue 29677755: Issue 6279 - Make HashContainer movable and optimize resizing by moving entries. (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Remove unneeded ctor. Rename _assign() Created Jan. 24, 2018, 7:31 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | compiled/Map.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 template<typename Value> 72 template<typename Value>
73 struct Uint32MapEntry : Uint32SetEntry 73 struct Uint32MapEntry : Uint32SetEntry
74 { 74 {
75 typedef Uint32SetEntry super; 75 typedef Uint32SetEntry super;
76 typedef Value value_type; 76 typedef Value value_type;
77 77
78 value_type second; 78 value_type second;
79 79
80 Uint32MapEntry(key_type_cref key = KEY_INVALID, value_type value = value_typ e()) 80 Uint32MapEntry(key_type_cref key = KEY_INVALID, value_type value = value_typ e())
81 : Uint32SetEntry(key), second(value) 81 : Uint32SetEntry(key), second(std::move(value))
82 { 82 {
83 } 83 }
84 84
85 void erase() 85 void erase()
86 { 86 {
87 super::erase(); 87 super::erase();
88 second = value_type(); 88 second = value_type();
89 } 89 }
90 }; 90 };
91 } 91 }
92 92
93 using Uint32Set = Set<Uint32Map_internal::Uint32SetEntry>; 93 using Uint32Set = Set<Uint32Map_internal::Uint32SetEntry>;
94 94
95 template<typename Value> 95 template<typename Value>
96 using Uint32Map = Map<Uint32Map_internal::Uint32MapEntry<Value>>; 96 using Uint32Map = Map<Uint32Map_internal::Uint32MapEntry<Value>>;
OLDNEW
« no previous file with comments | « no previous file | compiled/Map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld