Declare Visualizer::setEnabled() 'final'

We call the virtual method setEnabled() from Visualizer's
destructor.  In the destructor, the virtual binding is not used.
This isn't a problem for any current code, but to future-proof
against a possible future subclass of Visualizer, we declare
this method 'final'.

Test: TreeHugger
Change-Id: I703580b37cc1bf7f411caa723f95a691dff840a5
This commit is contained in:
Greg Kaiser
2019-10-25 12:55:02 -07:00
committed by Marco Nelissen
parent df5cd39198
commit d4dd8b8edf

View File

@@ -73,7 +73,8 @@ public:
~Visualizer();
virtual status_t setEnabled(bool enabled);
// Declared 'final' because we call this in ~Visualizer().
status_t setEnabled(bool enabled) final;
// maximum capture size in samples
static uint32_t getMaxCaptureSize() { return VISUALIZER_CAPTURE_SIZE_MAX; }