diff options
author | Pierre Ossman <ossman@cendio.se> | 2023-01-06 15:31:24 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2023-02-04 14:03:13 +0100 |
commit | f55abd7b0074bc6db9774ed563e02b11e634aa7d (patch) | |
tree | 4e84caf8a93212f64e4fc875a99585d7a1fd6c87 /common/rfb/JpegCompressor.cxx | |
parent | 9854463f16a3b98c55494e40f909d3b1f5f39192 (diff) | |
download | tigervnc-f55abd7b0074bc6db9774ed563e02b11e634aa7d.tar.gz tigervnc-f55abd7b0074bc6db9774ed563e02b11e634aa7d.zip |
Use operator overloading for comparison
It is much more natural than custom methods for this very common
operation.
Diffstat (limited to 'common/rfb/JpegCompressor.cxx')
-rw-r--r-- | common/rfb/JpegCompressor.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/rfb/JpegCompressor.cxx b/common/rfb/JpegCompressor.cxx index 51d3c357..d5c5fd0d 100644 --- a/common/rfb/JpegCompressor.cxx +++ b/common/rfb/JpegCompressor.cxx @@ -182,13 +182,13 @@ void JpegCompressor::compress(const uint8_t *buf, volatile int stride, #ifdef JCS_EXTENSIONS // Try to have libjpeg output directly to our native format // libjpeg can only handle some "standard" formats - if (pfRGBX.equal(pf)) + if (pfRGBX == pf) cinfo->in_color_space = JCS_EXT_RGBX; - else if (pfBGRX.equal(pf)) + else if (pfBGRX == pf) cinfo->in_color_space = JCS_EXT_BGRX; - else if (pfXRGB.equal(pf)) + else if (pfXRGB == pf) cinfo->in_color_space = JCS_EXT_XRGB; - else if (pfXBGR.equal(pf)) + else if (pfXBGR == pf) cinfo->in_color_space = JCS_EXT_XBGR; if (cinfo->in_color_space != JCS_RGB) { |