minor refactor, fixed many warnings

This commit is contained in:
2021-01-01 23:06:24 -06:00
parent bccabdebd7
commit 7e9b61e018
26 changed files with 53 additions and 49 deletions

View File

@@ -37,7 +37,7 @@ void freeChunk(CState* state, CChunk *chunk) {
int addConstant(CState* state, CChunk *chunk, CValue value) {
// before adding the constant, check if we already have it
for (int i = 0; i < chunk->constants.count; i++) {
for (size_t i = 0; i < chunk->constants.count; i++) {
if (cosmoV_equal(value, chunk->constants.values[i]))
return i; // we already have a matching constant!
}