[LyX/master] Fix Clang warning about struct/class mismatch

Jean-Marc Lasgouttes lasgouttes at lyx.org
Fri Nov 27 09:31:31 UTC 2020


Le 26/11/2020 à 22:39, Scott Kostyshak a écrit :
> Actually I realize I am ignorant on this: why is it preferred to use a
> forward declaration here? i.e., why not the following:
> 
> #include "frontends/CaretGeometry.h"
> 
> Is it because of faster compilation time or because we don't want to
> include a file from frontends/? Or is it for readability because when I
> see a forward declaration it gives me information that knowing the
> definition is not important for whatever purpose we use it for in this
> file?

It is for compilation speed. CaretGeometry.h will pull in <vector> and 
<list> (I could have used a second vector instead of a list, comments 
welcome).

JMarc


More information about the lyx-devel mailing list