mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-20 07:49:56 +02:00
alpha_processing: fix visual studio warnings
similar to '* const', __restrict needs to be included in the declaration to avoid warnings like: src\dsp\alpha_processing.c(429): warning C4028: formal parameter 1 different from declaration this change also moves WEBP_RESTRICT to dsp.h to avoid a circular dependency between it and utils.h which already includes dsp.h Change-Id: Ib070d358a372e76fae4be5445ab288940b9baac0
This commit is contained in:
@ -29,23 +29,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// WEBP_RESTRICT
|
||||
|
||||
// Declares a pointer with the restrict type qualifier if available.
|
||||
// This allows code to hint to the compiler that only this pointer references a
|
||||
// particular object or memory region within the scope of the block in which it
|
||||
// is declared. This may allow for improved optimizations due to the lack of
|
||||
// pointer aliasing. See also:
|
||||
// https://en.cppreference.com/w/c/language/restrict
|
||||
#if defined(__GNUC__)
|
||||
#define WEBP_RESTRICT __restrict__
|
||||
#elif defined(_MSC_VER)
|
||||
#define WEBP_RESTRICT __restrict
|
||||
#else
|
||||
#define WEBP_RESTRICT
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Memory allocation
|
||||
|
||||
|
Reference in New Issue
Block a user