aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-07-17 10:15:20 +0300
committerEugene Sandulenko2015-12-15 00:05:02 +0100
commit650819cfecf1877e07202fa0ec898dbb5609855b (patch)
tree69f685f4e0622ef79c900a74286a7ebc8e50f7ff
parentcc0baf48ed9a545a04d4d8f84213bdda3223ccc4 (diff)
downloadscummvm-rg350-650819cfecf1877e07202fa0ec898dbb5609855b.tar.gz
scummvm-rg350-650819cfecf1877e07202fa0ec898dbb5609855b.tar.bz2
scummvm-rg350-650819cfecf1877e07202fa0ec898dbb5609855b.zip
LAB: Simplify allocRoom()
-rw-r--r--engines/lab/allocroom.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/engines/lab/allocroom.cpp b/engines/lab/allocroom.cpp
index 3a5c7b9cf0..e6dad3bc23 100644
--- a/engines/lab/allocroom.cpp
+++ b/engines/lab/allocroom.cpp
@@ -168,26 +168,21 @@ static void *getCurMem(uint16 Size) {
return Ptr;
}
-
-
-
-
/*****************************************************************************/
/* Grabs a chunk of memory from the room buffer, and manages it for a */
/* particular room. */
/*****************************************************************************/
void allocRoom(void **Ptr, uint16 size, uint16 roomNum) {
uint16 rMarker;
- bool doit = true;
if (1 & size) /* Memory is required to be even aligned */
size++;
rMarker = 0;
- while ((rMarker < MAXMARKERS) && doit) {
+ while ((rMarker < MAXMARKERS)) {
if (RoomMarkers[rMarker].RoomNum == roomNum)
- doit = false;
+ break;
else
rMarker++;
}