From: dirk Date: Thu, 15 Jan 2015 21:02:57 +0000 (+0000) Subject: Removed MagickMax/MagickMin inline methods. X-Git-Tag: 7.0.1-0~1436 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=007e925e29fea767305ade6e1d635e5e517a13b3;p=imagemagick Removed MagickMax/MagickMin inline methods. --- diff --git a/MagickCore/delegate.c b/MagickCore/delegate.c index b7cda50c4..10faf75bf 100644 --- a/MagickCore/delegate.c +++ b/MagickCore/delegate.c @@ -56,6 +56,7 @@ #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" #include "MagickCore/hashmap.h" +#include "MagickCore/image-private.h" #include "MagickCore/list.h" #include "MagickCore/memory_.h" #include "MagickCore/nt-base-private.h" @@ -1007,13 +1008,6 @@ static MagickBooleanType IsDelegateCacheInstantiated(ExceptionInfo *exception) % */ -static inline size_t MagickMin(const size_t x,const size_t y) -{ - if (x < y) - return(x); - return(y); -} - static MagickBooleanType CopyDelegateFile(const char *source, const char *destination) { diff --git a/MagickCore/distribute-cache.c b/MagickCore/distribute-cache.c index ae3af5cb4..850b3854d 100644 --- a/MagickCore/distribute-cache.c +++ b/MagickCore/distribute-cache.c @@ -60,6 +60,7 @@ #include "MagickCore/exception-private.h" #include "MagickCore/geometry.h" #include "MagickCore/image.h" +#include "MagickCore/image-private.h" #include "MagickCore/list.h" #include "MagickCore/locale_.h" #include "MagickCore/memory_.h" @@ -137,14 +138,6 @@ % */ -static inline MagickSizeType MagickMin(const MagickSizeType x, - const MagickSizeType y) -{ - if (x < y) - return(x); - return(y); -} - static inline MagickOffsetType dpc_read(int file,const MagickSizeType length, unsigned char *restrict message) { diff --git a/MagickCore/geometry.c b/MagickCore/geometry.c index 717fdd78b..493998d35 100644 --- a/MagickCore/geometry.c +++ b/MagickCore/geometry.c @@ -45,6 +45,7 @@ #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" #include "MagickCore/geometry.h" +#include "MagickCore/image-private.h" #include "MagickCore/memory_.h" #include "MagickCore/string_.h" #include "MagickCore/string-private.h" @@ -1238,14 +1239,6 @@ MagickExport MagickStatusType ParseGravityGeometry(const Image *image, % */ -static inline size_t MagickMax(const size_t x, - const size_t y) -{ - if (x > y) - return(x); - return(y); -} - MagickExport MagickStatusType ParseMetaGeometry(const char *geometry,ssize_t *x, ssize_t *y,size_t *width,size_t *height) { diff --git a/MagickCore/locale.c b/MagickCore/locale.c index b35857b54..48bcdfb2b 100644 --- a/MagickCore/locale.c +++ b/MagickCore/locale.c @@ -46,6 +46,7 @@ #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" #include "MagickCore/hashmap.h" +#include "MagickCore/image-private.h" #include "MagickCore/locale_.h" #include "MagickCore/locale-private.h" #include "MagickCore/log.h" @@ -1150,13 +1151,6 @@ static void LocaleFatalErrorHandler( exit(1); } -static inline size_t MagickMin(const size_t x,const size_t y) -{ - if (x < y) - return(x); - return(y); -} - static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache, const char *xml,const char *filename,const char *locale,const size_t depth, ExceptionInfo *exception) diff --git a/MagickCore/matrix.c b/MagickCore/matrix.c index 7d1a2a7a5..cc65ee8cb 100644 --- a/MagickCore/matrix.c +++ b/MagickCore/matrix.c @@ -45,6 +45,7 @@ #include "MagickCore/cache.h" #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" +#include "MagickCore/image-private.h" #include "MagickCore/matrix.h" #include "MagickCore/memory_.h" #include "MagickCore/pixel-accessor.h" @@ -120,14 +121,6 @@ struct _MatrixInfo % */ -static inline MagickSizeType MagickMin(const MagickSizeType x, - const MagickSizeType y) -{ - if (x < y) - return(x); - return(y); -} - #if defined(SIGBUS) static void MatrixSignalHandler(int status) { diff --git a/MagickCore/random.c b/MagickCore/random.c index 932c3dddd..9f7223fff 100644 --- a/MagickCore/random.c +++ b/MagickCore/random.c @@ -50,6 +50,7 @@ #include "MagickCore/studio.h" #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" +#include "MagickCore/image-private.h" #include "MagickCore/memory_.h" #include "MagickCore/semaphore.h" #include "MagickCore/random_.h" @@ -159,13 +160,6 @@ static StringInfo % */ -static inline size_t MagickMin(const size_t x,const size_t y) -{ - if (x < y) - return(x); - return(y); -} - MagickExport RandomInfo *AcquireRandomInfo(void) { const StringInfo diff --git a/MagickCore/resource.c b/MagickCore/resource.c index 287c0f696..6eb25a53e 100644 --- a/MagickCore/resource.c +++ b/MagickCore/resource.c @@ -47,6 +47,7 @@ #include "MagickCore/hashmap.h" #include "MagickCore/log.h" #include "MagickCore/image.h" +#include "MagickCore/image-private.h" #include "MagickCore/memory_.h" #include "MagickCore/nt-base-private.h" #include "MagickCore/option.h" @@ -1003,13 +1004,6 @@ MagickExport MagickBooleanType RelinquishUniqueFileResource(const char *path) % */ -static inline size_t MagickMax(const size_t x,const size_t y) -{ - if (x > y) - return(x); - return(y); -} - static inline MagickSizeType StringToSizeType(const char *string, const double interval) { @@ -1208,14 +1202,6 @@ MagickPrivate void ResourceComponentTerminus(void) % */ -static inline MagickSizeType MagickMin(const MagickSizeType x, - const MagickSizeType y) -{ - if (x < y) - return(x); - return(y); -} - MagickExport MagickBooleanType SetMagickResourceLimit(const ResourceType type, const MagickSizeType limit) { diff --git a/MagickCore/string.c b/MagickCore/string.c index 7aff064b3..a84b56e80 100644 --- a/MagickCore/string.c +++ b/MagickCore/string.c @@ -44,6 +44,7 @@ #include "MagickCore/blob-private.h" #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" +#include "MagickCore/image-private.h" #include "MagickCore/list.h" #include "MagickCore/locale_.h" #include "MagickCore/log.h" @@ -356,13 +357,6 @@ MagickExport StringInfo *CloneStringInfo(const StringInfo *string_info) % */ -static inline size_t MagickMin(const size_t x,const size_t y) -{ - if (x < y) - return(x); - return(y); -} - MagickExport int CompareStringInfo(const StringInfo *target, const StringInfo *source) { diff --git a/MagickCore/type.c b/MagickCore/type.c index 0ada06906..c89e0c419 100644 --- a/MagickCore/type.c +++ b/MagickCore/type.c @@ -47,6 +47,7 @@ #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" #include "MagickCore/hashmap.h" +#include "MagickCore/image-private.h" #include "MagickCore/log.h" #include "MagickCore/memory_.h" #include "MagickCore/nt-feature.h" @@ -331,20 +332,6 @@ MagickExport const TypeInfo *GetTypeInfo(const char *name, % */ -static inline size_t MagickMax(const size_t x,const size_t y) -{ - if (x > y) - return(x); - return(y); -} - -static inline size_t MagickMin(const size_t x,const size_t y) -{ - if (x < y) - return(x); - return(y); -} - MagickExport const TypeInfo *GetTypeInfoByFamily(const char *family, const StyleType style,const StretchType stretch,const size_t weight, ExceptionInfo *exception) diff --git a/MagickCore/utility.c b/MagickCore/utility.c index b1d8ad353..841b423e6 100644 --- a/MagickCore/utility.c +++ b/MagickCore/utility.c @@ -46,6 +46,7 @@ #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" #include "MagickCore/geometry.h" +#include "MagickCore/image-private.h" #include "MagickCore/list.h" #include "MagickCore/log.h" #include "MagickCore/magick-private.h" @@ -149,14 +150,6 @@ MagickExport MagickBooleanType AcquireUniqueFilename(char *path) % */ -static inline MagickSizeType MagickMin(const MagickSizeType x, - const MagickSizeType y) -{ - if (x < y) - return(x); - return(y); -} - MagickExport MagickBooleanType AcquireUniqueSymbolicLink(const char *source, char *destination) { diff --git a/MagickCore/xml-tree.c b/MagickCore/xml-tree.c index e98901934..067f881c9 100644 --- a/MagickCore/xml-tree.c +++ b/MagickCore/xml-tree.c @@ -52,6 +52,7 @@ #include "MagickCore/blob-private.h" #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" +#include "MagickCore/image-private.h" #include "MagickCore/log.h" #include "MagickCore/memory_.h" #include "MagickCore/semaphore.h" @@ -595,14 +596,6 @@ MagickExport XMLTreeInfo *DestroyXMLTree(XMLTreeInfo *xml_info) % */ -static inline MagickSizeType MagickMin(const MagickSizeType x, - const MagickSizeType y) -{ - if (x < y) - return(x); - return(y); -} - MagickPrivate char *FileToXML(const char *filename,const size_t extent) { char