[Scummvm-cvs-logs] SF.net SVN: scummvm:[43882] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Sep 1 15:03:12 CEST 2009
Revision: 43882
http://scummvm.svn.sourceforge.net/scummvm/?rev=43882&view=rev
Author: fingolfin
Date: 2009-09-01 13:03:12 +0000 (Tue, 01 Sep 2009)
Log Message:
-----------
Coding best practice: Whenever possible, pass objects by reference instead of by value. Also make variables or data table which are only used locally "static".
Modified Paths:
--------------
scummvm/trunk/engines/sci/detection.cpp
scummvm/trunk/graphics/jpeg.cpp
scummvm/trunk/graphics/jpeg.h
Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp 2009-09-01 13:02:47 UTC (rev 43881)
+++ scummvm/trunk/engines/sci/detection.cpp 2009-09-01 13:03:12 UTC (rev 43882)
@@ -163,7 +163,7 @@
const ADGameDescription *fallbackDetect(const Common::FSList &fslist) const;
};
-Common::String convertSierraGameId(Common::String sierraId, uint32 *gameFlags) {
+static Common::String convertSierraGameId(const Common::String &sierraId, uint32 *gameFlags) {
// TODO: SCI32 IDs
if (sierraId == "demo")
Modified: scummvm/trunk/graphics/jpeg.cpp
===================================================================
--- scummvm/trunk/graphics/jpeg.cpp 2009-09-01 13:02:47 UTC (rev 43881)
+++ scummvm/trunk/graphics/jpeg.cpp 2009-09-01 13:03:12 UTC (rev 43882)
@@ -31,7 +31,7 @@
namespace Graphics {
// Order used to traverse the quantization tables
-uint8 JPEG::_zigZagOrder[64] = {
+static const uint8 _zigZagOrder[64] = {
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34,
Modified: scummvm/trunk/graphics/jpeg.h
===================================================================
--- scummvm/trunk/graphics/jpeg.h 2009-09-01 13:02:47 UTC (rev 43881)
+++ scummvm/trunk/graphics/jpeg.h 2009-09-01 13:03:12 UTC (rev 43882)
@@ -75,9 +75,6 @@
uint8 _maxFactorV;
uint8 _maxFactorH;
- // Zig-Zag order
- static uint8 _zigZagOrder[64];
-
// Quantization tables
uint16 *_quant[JPEG_MAX_QUANT_TABLES];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list