summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetObjectList.cpp
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2021-03-20 03:45:24 -0400
committerGitHub <noreply@github.com>2021-03-20 03:45:24 -0400
commit963a282dc10036f367a2cb09bb5651aefc73d2a4 (patch)
tree1c53ce8e6ac29c138921a6876511313e5b97e74f /ZAPD/ZRoom/Commands/SetObjectList.cpp
parentc8e1f444d4ce0f73a2cbed4b3abe9f1c1a496743 (diff)
Final Warning pass (#99)
* started on basic type errors * Done. For now * remove libgfxd binary * Fix Clang Warnings * Fix2 * Fix rollback of #92 and missed warning in ZCutscene.cpp * ? * add stdexcept to ZResource * Fix make clean * PR fixes * Fix make file stuff * Remove many more errors and remove -Wall * Turns out Globals was used * Final pass Co-authored-by: Fig02 <fig02srl@gmail.com>
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetObjectList.cpp')
-rw-r--r--ZAPD/ZRoom/Commands/SetObjectList.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ZAPD/ZRoom/Commands/SetObjectList.cpp b/ZAPD/ZRoom/Commands/SetObjectList.cpp
index e91b0e9..935332f 100644
--- a/ZAPD/ZRoom/Commands/SetObjectList.cpp
+++ b/ZAPD/ZRoom/Commands/SetObjectList.cpp
@@ -14,7 +14,7 @@ SetObjectList::SetObjectList(ZRoom* nZRoom, std::vector<uint8_t> rawData, int ra
segmentOffset = GETSEGOFFSET(BitConverter::ToInt32BE(rawData, rawDataIndex + 4));
uint32_t currentPtr = segmentOffset;
- for (int i = 0; i < objectCnt; i++)
+ for (uint8_t i = 0; i < objectCnt; i++)
{
uint16_t objectIndex = BitConverter::ToInt16BE(rawData, currentPtr);
objects.push_back(objectIndex);
@@ -38,7 +38,7 @@ string SetObjectList::GenerateSourceCodePass1(string roomName, int baseAddress)
string declaration = "";
- for (int i = 0; i < objects.size(); i++)
+ for (size_t i = 0; i < objects.size(); i++)
{
uint16_t objectIndex = objects[i];
declaration += StringHelper::Sprintf("\t%s,", ObjectList[objectIndex].c_str());