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".

svn-id: r43882
This commit is contained in:
Max Horn 2009-09-01 13:03:12 +00:00
parent 8e28469f1f
commit 11a16fa30e
3 changed files with 2 additions and 5 deletions

View File

@ -163,7 +163,7 @@ public:
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")

View File

@ -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,

View File

@ -75,9 +75,6 @@ private:
uint8 _maxFactorV;
uint8 _maxFactorH;
// Zig-Zag order
static uint8 _zigZagOrder[64];
// Quantization tables
uint16 *_quant[JPEG_MAX_QUANT_TABLES];