Skip to content

Commit 4b9b4a8

Browse files
author
nitrocaster
committed
xrRender_R4: Fix conformance in For loop scope (#104).
1 parent 1b68a3f commit 4b9b4a8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Layers/xrRenderPC_R4/r4_loader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ void CRender::LoadSectors(IReader* fs)
321321
{
322322
CDB::Collector CL;
323323
fs->find_chunk (fsL_PORTALS);
324-
for (i=0; i<count; i++)
324+
for (u32 i=0; i<count; i++)
325325
{
326326
b_portal P;
327327
fs->r (&P,sizeof(P));

src/Layers/xrRenderPC_R4/r4_rendertarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ CRenderTarget::CRenderTarget ()
898898
descHBAO.CPUAccessFlags = 0;
899899
descHBAO.MiscFlags = 0;
900900

901-
it = TEX_jitter_count-1;
901+
int it = TEX_jitter_count-1;
902902
subData[it].pSysMem = tempDataHBAO;
903903
subData[it].SysMemPitch = descHBAO.Width*sampleSize * sizeof(float);
904904

src/Layers/xrRenderPC_R4/r4_rendertarget_phase_bloom.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ void CalcGauss_k7(
4040
// calculate
4141
float mag = 0;
4242
for (int i=-7; i<=0; i++) W[-i] = expf (-float(i*i)/(2*r*r)); // weight
43-
for (i=0; i<8; i++) mag += i?2*W[i]:W[i]; // symmetrical weight
44-
for (i=0; i<8; i++) W[i] = s_out*W[i]/mag;
43+
for (int i=0; i<8; i++) mag += i?2*W[i]:W[i]; // symmetrical weight
44+
for (int i=0; i<8; i++) W[i] = s_out*W[i]/mag;
4545

4646
// W[0]=0, W[7]=-7
4747
w0.set (W[1],W[2],W[3],W[4]); // -1, -2, -3, -4

0 commit comments

Comments
 (0)