From: Cristy Date: Sat, 27 Jul 2019 20:26:38 +0000 (-0400) Subject: Improve GetNextToken() performance X-Git-Tag: 7.0.8-58~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=448fd18c8b61d91acac4cce6d531322190b02f25;p=imagemagick Improve GetNextToken() performance --- diff --git a/MagickCore/channel.c b/MagickCore/channel.c index 630ab6ed7..b7e11175e 100644 --- a/MagickCore/channel.c +++ b/MagickCore/channel.c @@ -249,7 +249,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression, channel_mask=UndefinedChannel; pixel=0.0; p=(char *) expression; - GetNextToken(p,&p,MagickPathExtent,token); + (void) GetNextToken(p,&p,MagickPathExtent,token); channel_op=ExtractChannelOp; for (channels=0; *token != '\0'; ) { @@ -263,7 +263,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression, { case ',': { - GetNextToken(p,&p,MagickPathExtent,token); + (void) GetNextToken(p,&p,MagickPathExtent,token); break; } case '|': @@ -272,7 +272,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression, source_image=GetNextImageInList(source_image); else source_image=GetFirstImageInList(source_image); - GetNextToken(p,&p,MagickPathExtent,token); + (void) GetNextToken(p,&p,MagickPathExtent,token); break; } case ';': @@ -301,7 +301,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression, destination_image=GetLastImageInList(destination_image); return((Image *) NULL); } - GetNextToken(p,&p,MagickPathExtent,token); + (void) GetNextToken(p,&p,MagickPathExtent,token); channels=0; destination_channel=RedPixelChannel; channel_mask=UndefinedChannel; @@ -320,23 +320,23 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression, } source_channel=(PixelChannel) i; channel_op=ExtractChannelOp; - GetNextToken(p,&p,MagickPathExtent,token); + (void) GetNextToken(p,&p,MagickPathExtent,token); if (*token == '<') { channel_op=ExchangeChannelOp; - GetNextToken(p,&p,MagickPathExtent,token); + (void) GetNextToken(p,&p,MagickPathExtent,token); } if (*token == '=') { if (channel_op != ExchangeChannelOp) channel_op=AssignChannelOp; - GetNextToken(p,&p,MagickPathExtent,token); + (void) GetNextToken(p,&p,MagickPathExtent,token); } if (*token == '>') { if (channel_op != ExchangeChannelOp) channel_op=TransferChannelOp; - GetNextToken(p,&p,MagickPathExtent,token); + (void) GetNextToken(p,&p,MagickPathExtent,token); } switch (channel_op) { @@ -407,7 +407,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression, if (((channels >= 1) || (destination_channel >= 1)) && (IsGrayColorspace(destination_image->colorspace) != MagickFalse)) (void) SetImageColorspace(destination_image,sRGBColorspace,exception); - GetNextToken(p,&p,MagickPathExtent,token); + (void) GetNextToken(p,&p,MagickPathExtent,token); break; } default: diff --git a/MagickCore/color.c b/MagickCore/color.c index 87415a0ad..d113a63ce 100644 --- a/MagickCore/color.c +++ b/MagickCore/color.c @@ -2030,7 +2030,7 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *cache,const char *xml, /* Interpret XML. */ - GetNextToken(q,&q,extent,token); + (void) GetNextToken(q,&q,extent,token); if (*token == '\0') break; (void) CopyMagickString(keyword,token,MagickPathExtent); @@ -2040,7 +2040,7 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *cache,const char *xml, Doctype element. */ while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0')) - GetNextToken(q,&q,extent,token); + (void) GetNextToken(q,&q,extent,token); continue; } if (LocaleNCompare(keyword,"