Skip to content
Extraits de code Groupes Projets
Valider f2fe1189 rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Work around an incorrect assertion in older versions of boost. Closes #1702.

parent 7f4c8853
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -60,7 +60,15 @@ std::shared_ptr<VideoFrame> VideoProviderCache::GetFrame(int n) { ...@@ -60,7 +60,15 @@ std::shared_ptr<VideoFrame> VideoProviderCache::GetFrame(int n) {
for (auto cur = cache.begin(); cur != cache.end(); ++cur) { for (auto cur = cache.begin(); cur != cache.end(); ++cur) {
if (cur->frame_number == n) { if (cur->frame_number == n) {
#if BOOST_VERSION <= 105200
// Until boost 1.52, boost::container::list incorrectly asserted
// that this != &other, so do an extra splice through an empty list
decltype(cache) temp;
temp.splice(temp.begin(), cache, cur);
cache.splice(cache.begin(), temp, temp.begin());
#else
cache.splice(cache.begin(), cache, cur); // Move to front cache.splice(cache.begin(), cache, cur); // Move to front
#endif
return std::make_shared<VideoFrame>(cache.front()); return std::make_shared<VideoFrame>(cache.front());
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter