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

Jean-Marc Lasgouttes lasgouttes at lyx.org
Thu Nov 26 19:06:38 UTC 2020


Le 26/11/2020 à 19:21, Scott Kostyshak a écrit :
> commit 9649e80c44f501d3ec758343c2eb0fd53a47d10f
> Author: Scott Kostyshak <skostysh at lyx.org>
> Date:   Thu Nov 26 13:48:42 2020 -0500
> 
>      Fix Clang warning about struct/class mismatch
>      
>      CaretGeometry is defined as a struct, but was forward-declared as a
>      class. Now we forward-declare as a struct. This addresses the
>      following Clang warning (that does not appear with GCC):

Good catch.

JMarc

>      
>      src/frontends/CaretGeometry.h:27:1: warning: 'CaretGeometry' defined
>      as a struct here but previously declared as a class; this is valid,
>      but may result in linker errors under the Microsoft C++ ABI
>      [-Wmismatched-tags]
> ---
>   src/BufferView.h |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/BufferView.h b/src/BufferView.h
> index ca7b20b..1b76da2 100644
> --- a/src/BufferView.h
> +++ b/src/BufferView.h
> @@ -26,7 +26,7 @@ namespace lyx {
>   
>   namespace support { class FileName; }
>   
> -namespace frontend { class CaretGeometry; }
> +namespace frontend { struct CaretGeometry; }
>   namespace frontend { class Painter; }
>   namespace frontend { class GuiBufferViewDelegate; }
>   
> 



More information about the lyx-cvs mailing list