Skip to content

Commit c197e03

Browse files
committedApr 21, 2015
Fix sign-compare compiler warnings in mg_ore.cpp
1 parent d36067f commit c197e03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

Diff for: ‎src/mg_ore.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void OreScatter::generate(MMVManip *vm, int mapseed, u32 blockseed,
135135
u32 orechance = (csize * csize * csize) / clust_num_ores;
136136
u32 nclusters = volume / clust_scarcity;
137137

138-
for (int i = 0; i != nclusters; i++) {
138+
for (u32 i = 0; i != nclusters; i++) {
139139
int x0 = pr.range(nmin.X, nmax.X - csize + 1);
140140
int y0 = pr.range(nmin.Y, nmax.Y - csize + 1);
141141
int z0 = pr.range(nmin.Z, nmax.Z - csize + 1);
@@ -250,9 +250,9 @@ void OreBlob::generate(MMVManip *vm, int mapseed, u32 blockseed,
250250
noise->seed = blockseed + i;
251251

252252
size_t index = 0;
253-
for (int z1 = 0; z1 != csize; z1++)
254-
for (int y1 = 0; y1 != csize; y1++)
255-
for (int x1 = 0; x1 != csize; x1++, index++) {
253+
for (u32 z1 = 0; z1 != csize; z1++)
254+
for (u32 y1 = 0; y1 != csize; y1++)
255+
for (u32 x1 = 0; x1 != csize; x1++, index++) {
256256
u32 i = vm->m_area.index(x0 + x1, y0 + y1, z0 + z1);
257257
if (!CONTAINS(c_wherein, vm->m_data[i].getContent()))
258258
continue;

0 commit comments

Comments
 (0)
Please sign in to comment.