From fdaaa0a704ad89df76c476e16a341899e3b2cbe5 Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Tue, 21 Jul 2020 10:19:08 +0200 Subject: [PATCH] Make PCB_EXPR_UCODE final This avoids a warning about its non-virtual destructor during deletion, as polymorphic classes are expected to be deleteable through any pointer. Possibly not entirely correct -- might be problematic if UCODE objects are deleted through a base pointer. --- pcbnew/pcb_expr_evaluator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/pcb_expr_evaluator.h b/pcbnew/pcb_expr_evaluator.h index aeeed1a108..19db5c53df 100644 --- a/pcbnew/pcb_expr_evaluator.h +++ b/pcbnew/pcb_expr_evaluator.h @@ -37,7 +37,7 @@ class BOARD_ITEM; class PCB_EXPR_VAR_REF; -class PCB_EXPR_UCODE : public LIBEVAL::UCODE +class PCB_EXPR_UCODE final : public LIBEVAL::UCODE { public: virtual LIBEVAL::VAR_REF* createVarRef( LIBEVAL::COMPILER *aCompiler,