From e288f163bbf3af6ae24e9df6cdd23e755ff1aaf5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 22 May 2023 17:32:11 +0200 Subject: [PATCH] Use custom DPF_DEBUG macro for leak class, DEBUG was too generic Signed-off-by: falkTX --- Makefile.base.mk | 2 +- distrho/extra/LeakDetector.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.base.mk b/Makefile.base.mk index 3d341f8f..b2565601 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -274,7 +274,7 @@ BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections endif ifeq ($(DEBUG),true) -BASE_FLAGS += -DDEBUG -O0 -g +BASE_FLAGS += -DDEBUG -DDPF_DEBUG -O0 -g # ifneq ($(HAIKU),true) # BASE_FLAGS += -fsanitize=address # endif diff --git a/distrho/extra/LeakDetector.hpp b/distrho/extra/LeakDetector.hpp index 784913c2..bd5a5b1c 100644 --- a/distrho/extra/LeakDetector.hpp +++ b/distrho/extra/LeakDetector.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2016 Filipe Coelho + * Copyright (C) 2012-2023 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -50,7 +50,7 @@ START_NAMESPACE_DISTRHO #define DISTRHO_JOIN_MACRO_HELPER(a, b) a ## b #define DISTRHO_JOIN_MACRO(item1, item2) DISTRHO_JOIN_MACRO_HELPER(item1, item2) -#if defined(DEBUG) && !defined(NDEBUG) +#if defined(DPF_DEBUG) && !defined(NDEBUG) /** This macro lets you embed a leak-detecting object inside a class.\n To use it, simply declare a DISTRHO_LEAK_DETECTOR(YourClassName) inside a private section of the class declaration. E.g.