forked from mia/Aegisub
Work around an incorrect assertion in older versions of boost. Closes #1702.
This commit is contained in:
parent
0523c27393
commit
3c59903420
1 changed files with 8 additions and 0 deletions
|
@ -60,7 +60,15 @@ std::shared_ptr<VideoFrame> VideoProviderCache::GetFrame(int n) {
|
|||
|
||||
for (auto cur = cache.begin(); cur != cache.end(); ++cur) {
|
||||
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
|
||||
#endif
|
||||
return std::make_shared<VideoFrame>(cache.front());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue