Author Topic: #if-#else-#endif  (Read 7077 times)

Offline niki

  • Single posting newcomer
  • *
  • Posts: 2
#if-#else-#endif
« on: August 15, 2018, 11:00:39 am »
Hello,
How could I fix next: see the attachment

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: #if-#else-#endif
« Reply #1 on: August 15, 2018, 01:58:50 pm »
What is the problem?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5906
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: #if-#else-#endif
« Reply #2 on: August 15, 2018, 02:46:52 pm »
What is the problem?
The first #if branch should be active, since the macro name is already defined in the header file.

I think CC's symbol tree can supply the macro definition query service, but not sure how to implement it in the Scintilla.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline niki

  • Single posting newcomer
  • *
  • Posts: 2
Re: #if-#else-#endif
« Reply #3 on: August 15, 2018, 05:17:13 pm »
Good direction,
I'll check it.
Thanks.