diff options
| author | louist103 <35883445+louist103@users.noreply.github.com> | 2021-03-20 03:45:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-20 03:45:24 -0400 |
| commit | 963a282dc10036f367a2cb09bb5651aefc73d2a4 (patch) | |
| tree | 1c53ce8e6ac29c138921a6876511313e5b97e74f /ZAPD/ZDisplayList.cpp | |
| parent | c8e1f444d4ce0f73a2cbed4b3abe9f1c1a496743 (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/ZDisplayList.cpp')
| -rw-r--r-- | ZAPD/ZDisplayList.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ZAPD/ZDisplayList.cpp b/ZAPD/ZDisplayList.cpp index 25cbe25..6e5c3e2 100644 --- a/ZAPD/ZDisplayList.cpp +++ b/ZAPD/ZDisplayList.cpp @@ -452,7 +452,7 @@ bool ZDisplayList::SequenceCheck(vector<F3DZEXOpcode> sequence, int startIndex) { bool success = true; - for (int j = 0; j < sequence.size(); j++) + for (size_t j = 0; j < sequence.size(); j++) { F3DZEXOpcode opcode = (F3DZEXOpcode)(instructions[startIndex + j] >> 56); @@ -1645,7 +1645,7 @@ string ZDisplayList::GetSourceOutputCode(const std::string& prefix) { OutputFormatter outputformatter; string sourceOutput = ""; - int dListSize = instructions.size() * sizeof(instructions[0]); + size_t dListSize = instructions.size() * sizeof(instructions[0]); gfxd_input_buffer(instructions.data(), dListSize); gfxd_endian(gfxd_endian_little, sizeof(uint64_t)); // tell gfxdis what format the data is @@ -1682,17 +1682,17 @@ string ZDisplayList::GetSourceOutputCode(const std::string& prefix) return lhs.first < rhs.first; }); - for (int i = 0; i < verticesSorted.size() - 1; i++) + for (size_t i = 0; i < verticesSorted.size() - 1; i++) { //int vtxSize = verticesSorted[i].second.size() * 16; - int vtxSize = (int)vertices[verticesSorted[i].first].size() * 16; + size_t vtxSize = vertices[verticesSorted[i].first].size() * 16; - if ((verticesSorted[i].first + vtxSize) > verticesSorted[i + 1].first) + if ((verticesSorted[i].first + (int)vtxSize) > verticesSorted[i + 1].first) { int intersectAmt = (verticesSorted[i].first + vtxSize) - verticesSorted[i + 1].first; int intersectIndex = intersectAmt / 16; - for (int j = intersectIndex; j < verticesSorted[i + 1].second.size(); j++) + for (size_t j = intersectIndex; j < verticesSorted[i + 1].second.size(); j++) { vertices[verticesSorted[i].first].push_back(verticesSorted[i + 1].second[j]); } @@ -1750,7 +1750,7 @@ string ZDisplayList::GetSourceOutputCode(const std::string& prefix) return lhs.first < rhs.first; }); - for (int i = 0; i < texturesSorted.size() - 1; i++) + for (size_t i = 0; i < texturesSorted.size() - 1; i++) { int texSize = scene->textures[texturesSorted[i].first]->GetRawDataSize(); @@ -1780,7 +1780,7 @@ string ZDisplayList::GetSourceOutputCode(const std::string& prefix) return lhs.first < rhs.first; }); - for (int i = 0; i < texturesSorted.size() - 1; i++) + for (size_t i = 0; i < texturesSorted.size() - 1; i++) { if (texturesSorted.size() == 0) // ????? break; |
