Forum

    • Register
    • Login
    • Search
    • Categories

    define PRE_PROCESSOR - best location?

    General Questions
    2
    3
    55
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ustk
      ustk last edited by

      Is there a prefered place where to define a new preproc constant?
      Is the header of the component/class in question a good place to put it as we can see sometimes?
      Does it depend on the scope?

      I want it to be consistent in order to contribute to Hise properly...

      Also, it would be great to have all the preproc listed in the doc

      I cannot help pressing F5 in the forum...
      Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

      1 Reply Last reply Reply Quote 1
      • Christoph Hart
        Christoph Hart last edited by

        If you add them at the .h file of the module (so hi_tools.h in /hi_tools) and prepend a

        /** Config: HISE_MY_PREPROCESSOR
        
        Describes what the preprocessor does
        */
        #ifndef HISE_MY_PREPROCESSOR
        #define HISE_MY_PREPROCESSOR 0
        #endif
        

        it can be selected in the Projucer, which is quite handy (take a look at how the other preprocessors are defined there). I would also prepend HISE_, so that it won't clash with other preprocessors.

        ustk 1 Reply Last reply Reply Quote 2
        • ustk
          ustk @Christoph Hart last edited by

          @Christoph-Hart Cool thanks 🙂
          In this case it's for a value -> HISE_PANEL_MOUSE_DRAG_THRESHOLD or something like this... Currently set to 4px, but I always use 0.
          Or, a bool, like HISE_DISABLE_PANEL_MOUSE_DRAG_THRESHOLD might be good enough, I can't imagine one wants to set it at 50px 🙄

          I cannot help pressing F5 in the forum...
          Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          15
          Online

          982
          Users

          6.6k
          Topics

          60.8k
          Posts