[LyX/master] Remove unneeded code

Scott Kostyshak skostysh at lyx.org
Wed Jul 27 11:38:33 UTC 2022


On Wed, Jul 27, 2022 at 12:44:57PM +0200, Scott Kostyshak wrote:
> commit 11d5e31c65c36a8ba67a72b2486e1bdc1406f1e0
> Author: Scott Kostyshak <skostysh at lyx.org>
> Date:   Wed Jul 27 07:26:19 2022 -0400
> 
>     Remove unneeded code
>     
>     This code was triggering the following warnings:
>     
>       src/mathed/InsetMathHull.cpp:234:15: error: variable 'counters_to_save' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
>               const char * counters_to_save[] = {"section", "chapter"};
>                            ^
>       src/mathed/InsetMathHull.cpp:235:21: error: unused variable 'numcnts' [-Werror,-Wunused-const-variable]
>               unsigned int const numcnts = sizeof(counters_to_save)/sizeof(char *);
>     
>     The original code was put in at 645f9fdf (and the comment at 8a226ec4).
>     
>     This commit amends a65e12d6.
> ---
>  src/mathed/InsetMathHull.cpp |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
> index a9dd9fd..ec5a58e 100644
> --- a/src/mathed/InsetMathHull.cpp
> +++ b/src/mathed/InsetMathHull.cpp
> @@ -228,14 +228,6 @@ void InsetMathHull::setBuffer(Buffer & buffer)
>  }
>  
>  
> -// FIXME This should really be controlled by the TOC level, or
> -// something of the sort.
> -namespace {
> -	const char * counters_to_save[] = {"section", "chapter"};
> -	unsigned int const numcnts = sizeof(counters_to_save)/sizeof(char *);
> -} // namespace
> -
> -
>  void InsetMathHull::updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted)
>  {
>  	if (!buffer_) {
> -- 
> lyx-cvs mailing list
> lyx-cvs at lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-cvs

JMarc, can you double-check it is intended (after a65e12d6) that this
code is no longer needed?

It is a nice auxiliary effect that your commit got rid of a "FIXME".
Only 885 FIXMEs left (in the src directory).

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220727/050e4d60/attachment.asc>


More information about the lyx-devel mailing list