RS_GraphicView::setPenForEntity

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

RS_GraphicView::setPenForEntity

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

Re: RS_GraphicView::setPenForEntity

dxli
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
|

Re: RS_GraphicView::setPenForEntity

ravas
This post was updated on .
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
|

Re: RS_GraphicView::setPenForEntity

dxli
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
|

Re: RS_GraphicView::setPenForEntity

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