mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-17 06:19:54 +02:00
make WebPEncodingSetError() take a const picture
This is a border-case situation: the picture is not const, because we're change its error status. But taking it non-const forces the caller to carry a non-const picture all around the code just in case (0.00001% of the time?) something bad happen. This pretty much the same as making all objects non-const because we'll eventually call delete or free() on them, which is quite a non-const operation. Well... Better allow constness enforcement for the remaining 99.9999% of the code. Change-Id: I9b93892a189a50feaec1a3a518ebf488eb6ff22f
This commit is contained in:
@ -473,7 +473,7 @@ int VP8StatLoop(VP8Encoder* const enc);
|
||||
|
||||
// in webpenc.c
|
||||
// Assign an error code to a picture. Return false for convenience.
|
||||
int WebPEncodingSetError(WebPPicture* const pic, WebPEncodingError error);
|
||||
int WebPEncodingSetError(const WebPPicture* const pic, WebPEncodingError error);
|
||||
int WebPReportProgress(VP8Encoder* const enc, int percent);
|
||||
|
||||
// in analysis.c
|
||||
|
Reference in New Issue
Block a user