Skip to content

Add platform dependent assert macro #158

@TheSlowGrowth

Description

@TheSlowGrowth

It would be great to have a platform-independent way for assertions (e.g. bkpt 255 on ARM, assert(), etc.).

  1. Create Source/platform.h
  2. Add macro D_SP_ASSERTFALSE that triggers an assertion. The JUCE macro jassertfalse could serve as a template and could be extended for bkpt 255 when compiling for embedded targets.
  3. Add macro D_SP_ASSERT(bool condition) that triggers D_SP_ASSERTFALSE if !condition
  4. Replace all existing assertions with these macros

The same file could also be very useful in libDaisy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions