| OLD | NEW |
| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 template<typename Key, typename Value> | 88 template<typename Key, typename Value> |
| 89 struct StringMapEntry : StringSetEntry<Key> | 89 struct StringMapEntry : StringSetEntry<Key> |
| 90 { | 90 { |
| 91 typedef StringSetEntry<Key> super; | 91 typedef StringSetEntry<Key> super; |
| 92 typedef Value value_type; | 92 typedef Value value_type; |
| 93 | 93 |
| 94 value_type second; | 94 value_type second; |
| 95 | 95 |
| 96 StringMapEntry(typename super::key_type_cref key = Key(), | 96 StringMapEntry(typename super::key_type_cref key = Key(), |
| 97 value_type value = value_type()) | 97 value_type value = value_type()) |
| 98 : super(key), second(value) | 98 : super(key), second(std::move(value)) |
| 99 { | 99 { |
| 100 } | 100 } |
| 101 | 101 |
| 102 void erase() | 102 void erase() |
| 103 { | 103 { |
| 104 super::erase(); | 104 super::erase(); |
| 105 second = value_type(); | 105 second = value_type(); |
| 106 } | 106 } |
| 107 }; | 107 }; |
| 108 } | 108 } |
| 109 | 109 |
| 110 using StringSet = Set<StringMap_internal::StringSetEntry<DependentString>>; | 110 using StringSet = Set<StringMap_internal::StringSetEntry<DependentString>>; |
| 111 | 111 |
| 112 template<typename Value> | 112 template<typename Value> |
| 113 using StringMap = Map<StringMap_internal::StringMapEntry<DependentString, Value>
>; | 113 using StringMap = Map<StringMap_internal::StringMapEntry<DependentString, Value>
>; |
| 114 template<typename Value> | 114 template<typename Value> |
| 115 using OwnedStringMap = Map<StringMap_internal::StringMapEntry<OwnedString, Value
>>; | 115 using OwnedStringMap = Map<StringMap_internal::StringMapEntry<OwnedString, Value
>>; |
| OLD | NEW |