Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 14 matching lines...) Expand all Loading... | |
25 namespace StringMap_internal | 25 namespace StringMap_internal |
26 { | 26 { |
27 struct StringSetEntry | 27 struct StringSetEntry |
28 { | 28 { |
29 typedef DependentString key_type; | 29 typedef DependentString key_type; |
30 typedef const String& key_type_cref; | 30 typedef const String& key_type_cref; |
31 typedef size_t size_type; | 31 typedef size_t size_type; |
32 | 32 |
33 key_type first; | 33 key_type first; |
34 | 34 |
35 StringSetEntry(key_type_cref key = DependentString()) | 35 StringSetEntry(key_type_cref key = key_type()) |
sergei
2017/12/04 14:26:09
here and below the default value for `key` could b
Wladimir Palant
2017/12/04 18:28:48
It's non-trivial to initialize that static member,
| |
36 { | 36 { |
37 if (!key.is_invalid()) | 37 if (!key.is_invalid()) |
38 first.reset(key); | 38 first.reset(key); |
39 } | 39 } |
40 | 40 |
41 bool equals(key_type_cref other) const | 41 bool equals(key_type_cref other) const |
42 { | 42 { |
43 return first.equals(other); | 43 return first.equals(other); |
44 } | 44 } |
45 | 45 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 super::erase(); | 87 super::erase(); |
88 second = value_type(); | 88 second = value_type(); |
89 } | 89 } |
90 }; | 90 }; |
91 } | 91 } |
92 | 92 |
93 using StringSet = Set<StringMap_internal::StringSetEntry>; | 93 using StringSet = Set<StringMap_internal::StringSetEntry>; |
94 | 94 |
95 template<typename Value> | 95 template<typename Value> |
96 using StringMap = Map<StringMap_internal::StringMapEntry<Value>>; | 96 using StringMap = Map<StringMap_internal::StringMapEntry<Value>>; |
LEFT | RIGHT |