[LyX/2.3.x] Qt4 compilable again

Pavel Sanda sanda at lyx.org
Fri Nov 25 10:28:22 UTC 2022


On Thu, Nov 24, 2022 at 04:21:04PM +0000, José Matos wrote:
> On Wed, 2022-11-23 at 22:47 +0100, Pavel Sanda wrote:
> > +#else
> > +#define qDegreesToRadians(degree) (degree * (M_PI / 180))
> > +#endif
> 
> Probably here it does not mater but in general the safer version would
> be to move the parenthesis from right to let, i.e.
> 
>  (degree) * M_PI/180
> 
> I am thinking about examples like qDegreesToRadians(a+b)

Right. But if you are after general safety you need to have outer as well
otherwise qDegreesToRadians(!a) will mean something different...

Pavel


More information about the lyx-devel mailing list