From 2dbee940e0d1c91966d631fb60a4834bf971a478 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 24 Jan 2018 11:43:45 -0500 Subject: [PATCH] Fix Windows build --- src/FFmpeg.h | 8 ++++++-- src/FileFormats.h | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/FFmpeg.h b/src/FFmpeg.h index 327599df6..30fb2fcc9 100644 --- a/src/FFmpeg.h +++ b/src/FFmpeg.h @@ -972,11 +972,15 @@ using AVDictionaryCleanup = std::unique_ptr< AVDictionary*, AV_Deleter >; struct UFileHolder : public std::unique_ptr< - AVIOContext, AV_Deleter + AVIOContext, ::AV_Deleter > { UFileHolder() = default; - UFileHolder( UFileHolder&& ) = default; + UFileHolder( UFileHolder &&that ) + : std::unique_ptr< AVIOContext, ::AV_Deleter >( + std::move(that) ) + { + } // Close explicitly, not ignoring return values. int close() diff --git a/src/FileFormats.h b/src/FileFormats.h index c80fd60ff..f02fee46f 100644 --- a/src/FileFormats.h +++ b/src/FileFormats.h @@ -128,10 +128,12 @@ inline R SFCall(F fun, Args&&... args) //RAII for SNDFILE* struct SFFileCloser { int operator () (SNDFILE*) const; }; -struct SFFile : public std::unique_ptr +struct SFFile : public std::unique_ptr { SFFile() = default; - SFFile( SFFile&& ) = default; + SFFile( SFFile &&that ) + : std::unique_ptr( std::move( that ) ) + {} // Close explicitly, not ignoring return values. int close()