diff options
author | Pierre Ossman <ossman@cendio.se> | 2012-01-30 13:53:11 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2012-01-30 13:53:11 +0000 |
commit | 654e3f906c7e1467f4ec7af06382aa1f4662964a (patch) | |
tree | 0f76a186421062b4357fb224ade06832897a8ee5 | |
parent | 559a2e8f471edb9142eea892acc101d6fc58f0d6 (diff) | |
download | tigervnc-654e3f906c7e1467f4ec7af06382aa1f4662964a.tar.gz tigervnc-654e3f906c7e1467f4ec7af06382aa1f4662964a.zip |
Be more liberal with const in places where write access isn't needed.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4840 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | common/rfb/JpegCompressor.cxx | 2 | ||||
-rw-r--r-- | common/rfb/JpegCompressor.h | 2 | ||||
-rw-r--r-- | common/rfb/PixelTransformer.cxx | 6 | ||||
-rw-r--r-- | common/rfb/PixelTransformer.h | 6 | ||||
-rw-r--r-- | common/rfb/transTempl.h | 6 |
5 files changed, 11 insertions, 11 deletions
diff --git a/common/rfb/JpegCompressor.cxx b/common/rfb/JpegCompressor.cxx index f4b6ed1c..b3c5f7c4 100644 --- a/common/rfb/JpegCompressor.cxx +++ b/common/rfb/JpegCompressor.cxx @@ -141,7 +141,7 @@ JpegCompressor::~JpegCompressor(void) delete cinfo; } -void JpegCompressor::compress(rdr::U8 *buf, int pitch, const Rect& r, +void JpegCompressor::compress(const rdr::U8 *buf, int pitch, const Rect& r, const PixelFormat& pf, int quality, JPEG_SUBSAMP subsamp) { int w = r.width(); diff --git a/common/rfb/JpegCompressor.h b/common/rfb/JpegCompressor.h index 798572e0..d50e5871 100644 --- a/common/rfb/JpegCompressor.h +++ b/common/rfb/JpegCompressor.h @@ -51,7 +51,7 @@ namespace rfb { JpegCompressor(int bufferLen = 128*1024); virtual ~JpegCompressor(); - void compress(rdr::U8 *, int, const Rect&, const PixelFormat&, int, + void compress(const rdr::U8 *, int, const Rect&, const PixelFormat&, int, JPEG_SUBSAMP); void writeBytes(const void*, int); diff --git a/common/rfb/PixelTransformer.cxx b/common/rfb/PixelTransformer.cxx index ce799ac7..cedf9000 100644 --- a/common/rfb/PixelTransformer.cxx +++ b/common/rfb/PixelTransformer.cxx @@ -31,7 +31,7 @@ using namespace rfb; static void noTransFn(void* table_, - const PixelFormat& inPF, void* inPtr, int inStride, + const PixelFormat& inPF, const void* inPtr, int inStride, const PixelFormat& outPF, void* outPtr, int outStride, int width, int height) { @@ -289,7 +289,7 @@ void PixelTransformer::setColourMapEntries(int firstCol, int nCols) } } -void PixelTransformer::translatePixels(void* inPtr, void* outPtr, +void PixelTransformer::translatePixels(const void* inPtr, void* outPtr, int nPixels) const { if (!transFn) @@ -299,7 +299,7 @@ void PixelTransformer::translatePixels(void* inPtr, void* outPtr, outPF, outPtr, nPixels, nPixels, 1); } -void PixelTransformer::translateRect(void* inPtr, int inStride, +void PixelTransformer::translateRect(const void* inPtr, int inStride, Rect inRect, void* outPtr, int outStride, Point outCoord) const diff --git a/common/rfb/PixelTransformer.h b/common/rfb/PixelTransformer.h index a368b63a..88ec7c40 100644 --- a/common/rfb/PixelTransformer.h +++ b/common/rfb/PixelTransformer.h @@ -27,7 +27,7 @@ namespace rfb { typedef void (*transFnType)(void* table_, - const PixelFormat& inPF, void* inPtr, + const PixelFormat& inPF, const void* inPtr, int inStride, const PixelFormat& outPF, void* outPtr, int outStride, int width, int height); @@ -78,11 +78,11 @@ namespace rfb { // putting it into the buffer pointed to by outPtr. The pixels at inPtr // should be in the format given by inPF to init(), and the translated // pixels will be in the format given by the outPF argument to init(). - void translatePixels(void* inPtr, void* outPtr, int nPixels) const; + void translatePixels(const void* inPtr, void* outPtr, int nPixels) const; // Similar to translatePixels() but handles an arbitrary region of // two pixel buffers. - void translateRect(void* inPtr, int inStride, Rect inRect, + void translateRect(const void* inPtr, int inStride, Rect inRect, void* outPtr, int outStride, Point outCoord) const; bool willTransform(void); diff --git a/common/rfb/transTempl.h b/common/rfb/transTempl.h index 09dc7f95..b133e869 100644 --- a/common/rfb/transTempl.h +++ b/common/rfb/transTempl.h @@ -51,7 +51,7 @@ // large (for 16bpp, the table needs 64K entries). void transSimpleINtoOUT (void* table_, - const PixelFormat& inPF, void* inPtr, int inStride, + const PixelFormat& inPF, const void* inPtr, int inStride, const PixelFormat& outPF, void* outPtr, int outStride, int width, int height) { @@ -85,7 +85,7 @@ void transSimpleINtoOUT (void* table_, // into two different functions for efficiency. void transRGBINtoOUT (void* table, - const PixelFormat& inPF, void* inPtr, int inStride, + const PixelFormat& inPF, const void* inPtr, int inStride, const PixelFormat& outPF, void* outPtr, int outStride, int width, int height) { @@ -115,7 +115,7 @@ void transRGBINtoOUT (void* table, // colour cube index in a fourth table to yield a pixel value. void transRGBCubeINtoOUT (void* table, - const PixelFormat& inPF, void* inPtr, int inStride, + const PixelFormat& inPF, const void* inPtr, int inStride, const PixelFormat& outPF, void* outPtr, int outStride, int width, int height) { |