diff options
author | Colin Snover | 2016-10-26 20:49:57 -0500 |
---|---|---|
committer | Colin Snover | 2016-10-26 20:56:40 -0500 |
commit | 8028b3c2907c559699afcb4c4895d39ad041f308 (patch) | |
tree | e4cb657f68dc6621da7feb5a1f74c9c1184de1ce /engines/sci | |
parent | 77bd2865cc8dba8d94c4e5153c9acb93d0db712d (diff) | |
download | scummvm-rg350-8028b3c2907c559699afcb4c4895d39ad041f308.tar.gz scummvm-rg350-8028b3c2907c559699afcb4c4895d39ad041f308.tar.bz2 scummvm-rg350-8028b3c2907c559699afcb4c4895d39ad041f308.zip |
SCI32: Use standard max_size method instead of ARRAYSIZE for a container
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/graphics/lists32.h | 7 | ||||
-rw-r--r-- | engines/sci/graphics/transitions32.cpp | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/graphics/lists32.h b/engines/sci/graphics/lists32.h index 4f74c77325..ff0bc6ceae 100644 --- a/engines/sci/graphics/lists32.h +++ b/engines/sci/graphics/lists32.h @@ -170,6 +170,13 @@ public: } /** + * The maximum number of elements the container is able to hold. + */ + size_type max_size() const { + return N; + } + + /** * The number of populated slots in the array. The size * of the array will only go down once `pack` is called. */ diff --git a/engines/sci/graphics/transitions32.cpp b/engines/sci/graphics/transitions32.cpp index ddcb50b140..bad0185179 100644 --- a/engines/sci/graphics/transitions32.cpp +++ b/engines/sci/graphics/transitions32.cpp @@ -778,7 +778,7 @@ bool GfxTransitions32::processPixelDissolve21Mid(const PlaneShowStyle &showStyle int seq = 1; uint iteration = 0; - const uint numIterationsPerTick = ARRAYSIZE(g_sci->_gfxFrameout->_showList); + const uint numIterationsPerTick = g_sci->_gfxFrameout->_showList.max_size(); clearShowRects(); |