aboutsummaryrefslogtreecommitdiff
path: root/examples/file_reader.cc
diff options
context:
space:
mode:
authorBoyuan Yang <byang@debian.org>2023-11-27 22:46:32 -0500
committerBoyuan Yang <byang@debian.org>2023-11-27 22:46:32 -0500
commit7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d (patch)
tree4ed468528001d8e80e3be09413ae927ca2ac05ce /examples/file_reader.cc
parent0d1e75e423265689dd49c7d6023d8bba70ca4d05 (diff)
parent19564cb4f77660cdb2f980ca619d4b979b9fe342 (diff)
downloadlibgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.tar.gz
libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.tar.bz2
libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.zip
Update upstream source from tag 'upstream/0.19.0'
Update to upstream version '0.19.0' with Debian dir a4233a4a247b06e8d6e36d07d059f03582d97721
Diffstat (limited to 'examples/file_reader.cc')
-rw-r--r--examples/file_reader.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/file_reader.cc b/examples/file_reader.cc
index b096722..a01b7ab 100644
--- a/examples/file_reader.cc
+++ b/examples/file_reader.cc
@@ -82,7 +82,14 @@ std::unique_ptr<FileReaderInterface> FileReader::Open(
return nullptr;
}
- return file;
+ // With C++11, to return |file|, an explicit move is required as the return
+ // type differs from the local variable. Overload resolution isn't guaranteed
+ // in this case, though some compilers may adopt the C++14 behavior (C++
+ // Standard Core Language Issue #1579, Return by converting move
+ // constructor):
+ // https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579
+ // To keep things simple we opt for the following compatible form.
+ return std::unique_ptr<FileReaderInterface>(file.release());
}
// IVF Frame Header format, from https://wiki.multimedia.cx/index.php/IVF