Avoid declaring a new variable shadowing an existing one in the same function

All the following loops below assume that int iIdx already is declared.
This commit is contained in:
Martin Storsjö
2015-02-04 11:25:09 +02:00
parent dc067286b3
commit 6c1aa29431

View File

@@ -3175,7 +3175,7 @@ TEST_F (EncodeDecodeTestAPI, SimulcastAVC) {
int iIdx = 0;
//create decoder
for (int iIdx = 0; iIdx < iSpatialLayerNum; iIdx++) {
for (iIdx = 0; iIdx < iSpatialLayerNum; iIdx++) {
pBsBuf[iIdx] = static_cast<unsigned char*> (malloc (iWidth * iHeight * 3 * sizeof (unsigned char) / 2));
aLen[iIdx] = 0;