Revision: 4840 http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4840&view=rev Author: ossman_ Date: 2012-01-30 13:53:11 +0000 (Mon, 30 Jan 2012) Log Message: ----------- Be more liberal with const in places where write access isn't needed.
Modified Paths: -------------- trunk/common/rfb/JpegCompressor.cxx trunk/common/rfb/JpegCompressor.h trunk/common/rfb/PixelTransformer.cxx trunk/common/rfb/PixelTransformer.h trunk/common/rfb/transTempl.h Modified: trunk/common/rfb/JpegCompressor.cxx =================================================================== --- trunk/common/rfb/JpegCompressor.cxx 2012-01-23 15:54:11 UTC (rev 4839) +++ trunk/common/rfb/JpegCompressor.cxx 2012-01-30 13:53:11 UTC (rev 4840) @@ -141,7 +141,7 @@ 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(); Modified: trunk/common/rfb/JpegCompressor.h =================================================================== --- trunk/common/rfb/JpegCompressor.h 2012-01-23 15:54:11 UTC (rev 4839) +++ trunk/common/rfb/JpegCompressor.h 2012-01-30 13:53:11 UTC (rev 4840) @@ -51,7 +51,7 @@ 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); Modified: trunk/common/rfb/PixelTransformer.cxx =================================================================== --- trunk/common/rfb/PixelTransformer.cxx 2012-01-23 15:54:11 UTC (rev 4839) +++ trunk/common/rfb/PixelTransformer.cxx 2012-01-30 13:53:11 UTC (rev 4840) @@ -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::translatePixels(void* inPtr, void* outPtr, +void PixelTransformer::translatePixels(const void* inPtr, void* outPtr, int nPixels) const { if (!transFn) @@ -299,7 +299,7 @@ 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 Modified: trunk/common/rfb/PixelTransformer.h =================================================================== --- trunk/common/rfb/PixelTransformer.h 2012-01-23 15:54:11 UTC (rev 4839) +++ trunk/common/rfb/PixelTransformer.h 2012-01-30 13:53:11 UTC (rev 4840) @@ -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 @@ // 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); Modified: trunk/common/rfb/transTempl.h =================================================================== --- trunk/common/rfb/transTempl.h 2012-01-23 15:54:11 UTC (rev 4839) +++ trunk/common/rfb/transTempl.h 2012-01-30 13:53:11 UTC (rev 4840) @@ -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 @@ // 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 @@ // 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) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Tigervnc-commits mailing list Tigervnc-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tigervnc-commits