Chromium Code Reviews| Index: media/cast/cast_defines.h |
| diff --git a/media/cast/cast_defines.h b/media/cast/cast_defines.h |
| index 7239148644f6fe089a61c7e3f65e545e7faa4f49..2311a353d1af67582e87c860b6cc9d4ccb048305 100644 |
| --- a/media/cast/cast_defines.h |
| +++ b/media/cast/cast_defines.h |
| @@ -35,6 +35,18 @@ enum DefaultSettings { |
| kDefaultRtpMaxDelayMs = 100, |
| }; |
| +template <class Collection> |
|
Alpha Left Google
2013/08/28 00:27:31
Is this being used? I can't find reference in this
pwestin
2013/08/28 16:40:44
It was used; removed since we introduced the linke
|
| +void EraseKeyAndDeleteValuePtr( |
| + Collection* const collection, |
| + const typename Collection::value_type::first_type& key) { |
| + typename Collection::iterator it = collection->find(key); |
| + if (it == collection->end()) return; |
| + |
| + typename Collection::value_type::second_type v = it->second; |
| + collection->erase(it); |
| + delete v; |
| +} |
| + |
| } // namespace cast |
| } // namespace media |