Debian Codegraph @

debian/patches/42_c++17_compatibility.patch

raw symbols SCIP
1 Description: C++17 compatibility
2 Use unsigned char to avoid collision with std::byte
3 Bug-Debian: https://bugs.debian.org/984316
4 Forwarded: no
5 Author: Graham Inggs <[email protected]>
6 Last-Update: 2021-10-04
7
8 --- a/src/pngSave.cpp
9 +++ b/src/pngSave.cpp
10 @@ -19,10 +19,8 @@
11
12 #include "progress.h"
13
14 -typedef unsigned char byte;
15
16 -
17 -void downsample2x2(byte * data, int sx, int sy){
18 +void downsample2x2(unsigned char *data, int sx, int sy){
19 int j=0;
20 for (int y=0; y<sy/2; y++)
21 for (int x=0; x<sx/2; x++)
22 @@ -37,7 +35,7 @@
23 }
24 }
25
26 -void downsample2x2NoAlpha(byte * data, int sx, int sy){
27 +void downsample2x2NoAlpha(unsigned char * data, int sx, int sy){
28 int j=0;
29 for (int y=0; y<sy/2; y++)
30 for (int x=0; x<sx/2; x++)
31 @@ -68,7 +66,7 @@
32 TRACE("Error:\n", error);
33 }
34
35 -bool PNGSaveWithAlpha( const char * filename, const byte * const data, int sx, int sy, int reverse ){
36 +bool PNGSaveWithAlpha( const char * filename, const unsigned char * data, int sx, int sy, int reverse ){
37 int type=4; int depth=8;
38 assert(filename);
39 assert(data);