lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clean up and fix glyph contour generation nits. (issue 566080043 by


From: hanwenn
Subject: Re: Clean up and fix glyph contour generation nits. (issue 566080043 by address@hidden)
Date: Sun, 10 May 2020 02:29:48 -0700

https://codereview.appspot.com/566080043/diff/560020046/lily/freetype.cc
File lily/freetype.cc (right):

https://codereview.appspot.com/566080043/diff/560020046/lily/freetype.cc#newcode143
lily/freetype.cc:143: };
On 2020/05/10 09:16:58, hahnjo wrote:
> Not sure if FT developers plan to change this interface at some point.
In other
> projects, I have seen something akin to
> FT_Outline_Funcs funcs;
> memset(&funcs, 0, sizeof(funcs));
> for external structs from dependencies to make sure no field goes
uninitialized.

the C99 standard actually says that omitted fields are zero-initialized

https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html

I added the field because GCC warns about it (I don't understand why)

https://codereview.appspot.com/566080043/diff/560020046/lily/freetype.cc#newcode149
lily/freetype.cc:149: return ((Path_interpreter *) user)->moveto (*to);
On 2020/05/10 09:16:59, hahnjo wrote:
> Do you want to create copies of the arguments? (here and for the other
> functions)

yes. I find it easier to reason about and read. It's all inlined anyway.

https://codereview.appspot.com/566080043/diff/560020046/lily/freetype.cc#newcode172
lily/freetype.cc:172: printf (" glyph %ld ", signed_idx);
On 2020/05/10 09:16:58, hahnjo wrote:
> debug?

Done.

https://codereview.appspot.com/566080043/diff/560020046/lily/freetype.cc#newcode188
lily/freetype.cc:188: interpreter.transform_ = transform;
On 2020/05/10 09:16:58, hahnjo wrote:
> create constructor for Path_interpreter?

Done.

https://codereview.appspot.com/566080043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]