diff options
author | U. Artie Eoff <ullysses.a.eoff@intel.com> | 2018-02-01 13:46:52 -0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2018-02-02 09:25:52 +0800 |
commit | 23e2f98dff7b013d0fd50904c7ab94e9f1dc491e (patch) | |
tree | aa17da0de05219a839482201d2f5e57d0e77d0dc | |
parent | dcae7d3df307f27d0545034768ae54d6153bfcbc (diff) | |
download | libva-intel-driver-23e2f98dff7b013d0fd50904c7ab94e9f1dc491e.tar.gz |
test: add virtual dtor to abstract classes
Abstract classes should have virtual destructors.
Missing virtual dtor's can be detected with
-Wnon-virtual-dtor compiler flag, too.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
-rw-r--r-- | test/i965_jpeg_test_data.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/i965_jpeg_test_data.h b/test/i965_jpeg_test_data.h index 9128140b..813c8089 100644 --- a/test/i965_jpeg_test_data.h +++ b/test/i965_jpeg_test_data.h @@ -276,6 +276,8 @@ namespace Decode { typedef std::shared_ptr<TestPattern> Shared; typedef std::shared_ptr<const TestPattern> SharedConst; + virtual ~TestPattern() { } + virtual const ByteData& decoded() const = 0; virtual PictureData::SharedConst encoded(unsigned) const = 0; @@ -431,6 +433,8 @@ namespace Encode { typedef std::shared_ptr<TestInputCreator> Shared; typedef std::shared_ptr<const TestInputCreator> SharedConst; + virtual ~TestInputCreator() { } + TestInput::Shared create(const unsigned) const; friend ::std::ostream& operator<<( |