// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MEDIA_CAST_COMMON_MOD_UTIL_H_ #define MEDIA_CAST_COMMON_MOD_UTIL_H_ #include "base/check.h" namespace media { namespace cast { // MAP is a map<uint??, ...> where the unsigned integer is // assumed to wrap around, but only a small range is used at a time. // Return the oldest entry in the map. template<class MAP> typename MAP::iterator ModMapOldest(MAP* map) { … } // MAP is a map<uint??, ...> where the unsigned integer is // assumed to wrap around, but only a small range is used at a time. // Returns the previous entry in the map. template<class MAP> typename MAP::iterator ModMapPrevious(MAP* map, typename MAP::iterator i) { … } } // namespace cast } // namespace media #endif // MEDIA_CAST_COMMON_MOD_UTIL_H_