Browse Source

Use custom DPF_DEBUG macro for leak class, DEBUG was too generic

Signed-off-by: falkTX <falktx@falktx.com>
pull/357/merge
falkTX 1 year ago
parent
commit
e288f163bb
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      Makefile.base.mk
  2. +2
    -2
      distrho/extra/LeakDetector.hpp

+ 1
- 1
Makefile.base.mk View File

@@ -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


+ 2
- 2
distrho/extra/LeakDetector.hpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO Plugin Framework (DPF)
* Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2023 Filipe Coelho <falktx@falktx.com>
*
* 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.


Loading…
Cancel
Save