Fix Windows build

This commit is contained in:
Paul Licameli 2018-01-24 11:43:45 -05:00
parent 9e8d36adc2
commit 2dbee940e0
2 changed files with 10 additions and 4 deletions

View File

@ -972,11 +972,15 @@ using AVDictionaryCleanup = std::unique_ptr<
AVDictionary*, AV_Deleter<AVDictionary*, void, av_dict_free>
>;
struct UFileHolder : public std::unique_ptr<
AVIOContext, AV_Deleter<AVIOContext, int, ufile_close>
AVIOContext, ::AV_Deleter<AVIOContext, int, ufile_close>
>
{
UFileHolder() = default;
UFileHolder( UFileHolder&& ) = default;
UFileHolder( UFileHolder &&that )
: std::unique_ptr< AVIOContext, ::AV_Deleter<AVIOContext, int, ufile_close> >(
std::move(that) )
{
}
// Close explicitly, not ignoring return values.
int close()

View File

@ -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<SNDFILE, SFFileCloser>
struct SFFile : public std::unique_ptr<SNDFILE, ::SFFileCloser>
{
SFFile() = default;
SFFile( SFFile&& ) = default;
SFFile( SFFile &&that )
: std::unique_ptr<SNDFILE, ::SFFileCloser>( std::move( that ) )
{}
// Close explicitly, not ignoring return values.
int close()