aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2016-10-26 20:49:57 -0500
committerColin Snover2016-10-26 20:56:40 -0500
commit8028b3c2907c559699afcb4c4895d39ad041f308 (patch)
treee4cb657f68dc6621da7feb5a1f74c9c1184de1ce /engines
parent77bd2865cc8dba8d94c4e5153c9acb93d0db712d (diff)
downloadscummvm-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')
-rw-r--r--engines/sci/graphics/lists32.h7
-rw-r--r--engines/sci/graphics/transitions32.cpp2
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();