HISE Logo Forum
    • Categories
    • Register
    • Login

    define PRE_PROCESSOR - best location?

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 175 Views
    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.
    • ustkU
      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

      Can't help pressing F5 in the forum...

      1 Reply Last reply Reply Quote 1
      • Christoph HartC
        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.

        ustkU 1 Reply Last reply Reply Quote 2
        • ustkU
          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 🙄

          Can't help pressing F5 in the forum...

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

          23

          Online

          1.8k

          Users

          12.0k

          Topics

          104.2k

          Posts