mirror of
https://github.com/CPunch/Cosmo.git
synced 2026-06-24 10:30:02 +00:00
minor refactor, fixed many warnings
This commit is contained in:
@@ -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!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user