Commit 51a1db16 by Nico Weber Committed by Geoff Lang

Give Timer a virtual destructor as it's deleted polymorphically.

Found by clang: ..\..\third_party\angle\src\common/angleutils.h(66,5) : error: delete called on 'Timer' that is abstract but has non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor] delete resource; ^ ..\..\third_party\angle\src\tests\perf_tests\ANGLEPerfTest.cpp(26,5) : note: in instantiation of function template specialization 'SafeDelete<Timer>' requested here SafeDelete(mTimer); ^ BUG=chromium:82385 Change-Id: I69033b1802b5dffbdf2d80889aca7019d710d481 Reviewed-on: https://chromium-review.googlesource.com/264061Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 711d8663
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
class Timer class Timer
{ {
public: public:
virtual ~Timer() {}
virtual void start() = 0; virtual void start() = 0;
virtual void stop() = 0; virtual void stop() = 0;
virtual double getElapsedTime() const = 0; virtual double getElapsedTime() const = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment