Login  Register

RS_GraphicView::setPenForEntity

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

RS_GraphicView::setPenForEntity

ravas
870 posts
What is the point of "#if 1"
and the #else block?
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: RS_GraphicView::setPenForEntity

dxli
1985 posts
it's the way of saying "true" for the preprocessor.

"#if TRUE" may read better, but the "TRUE" is usually defined as 1 by macro.

ravas wrote
What is the point of "#if 1"
and the #else block?
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: RS_GraphicView::setPenForEntity

ravas
870 posts
This post was updated on Nov 14, 2015; 9:31pm.
Yea I understand that.
But why are we using a directive?
When will the #else block ever be considered?
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: RS_GraphicView::setPenForEntity

dxli
1985 posts
just one way to keep the old code. To me, it's another way of saying, "I'm not confident about my change here'

ravas wrote
Yea I understand that.
But why are we using a directive at all?
When will the #else block ever be considered?
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: RS_GraphicView::setPenForEntity

ravas
870 posts
That's what I thought.
My opinion: Old code belongs in the commit diff where it was removed... ;-]
Git confident! ;p