diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/makemhr/loaddef.cpp | 9 | ||||
-rw-r--r-- | utils/makemhr/loadsofa.cpp | 10 | ||||
-rw-r--r-- | utils/sofa-info.cpp | 10 |
3 files changed, 10 insertions, 19 deletions
diff --git a/utils/makemhr/loaddef.cpp b/utils/makemhr/loaddef.cpp index 5f6d76d8..aaefd62c 100644 --- a/utils/makemhr/loaddef.cpp +++ b/utils/makemhr/loaddef.cpp @@ -1737,7 +1737,7 @@ static int ProcessSources(TokenReaderT *tr, HrirDataT *hData) hData->mHrirsBase.resize(channels * hData->mIrCount * hData->mIrSize); double *hrirs = hData->mHrirsBase.data(); std::vector<double> hrir(hData->mIrPoints); - uint line, col, fi, ei, ai, ti; + uint line, col, fi, ei, ai; int count; printf("Loading sources..."); @@ -1827,8 +1827,7 @@ static int ProcessSources(TokenReaderT *tr, HrirDataT *hData) for(fi = 0;fi < hData->mFdCount;fi++) { double delta = aer[2] - hData->mFds[fi].mDistance; - if(std::abs(delta) < 0.001) - break; + if(std::abs(delta) < 0.001) break; } if(fi >= hData->mFdCount) continue; @@ -1892,7 +1891,6 @@ static int ProcessSources(TokenReaderT *tr, HrirDataT *hData) for(;;) { SourceRefT src; - uint ti = 0; if(!ReadSourceRef(tr, &src)) return 0; @@ -1907,6 +1905,7 @@ static int ProcessSources(TokenReaderT *tr, HrirDataT *hData) if(!LoadSource(&src, hData->mIrRate, hData->mIrPoints, hrir.data())) return 0; + uint ti{0}; if(hData->mChannelType == CT_STEREO) { char ident[MAX_IDENT_LEN+1]; @@ -1976,7 +1975,7 @@ static int ProcessSources(TokenReaderT *tr, HrirDataT *hData) } } } - for(ti = 0;ti < channels;ti++) + for(uint ti{0};ti < channels;ti++) { for(fi = 0;fi < hData->mFdCount;fi++) { diff --git a/utils/makemhr/loadsofa.cpp b/utils/makemhr/loadsofa.cpp index 02911e12..219eb558 100644 --- a/utils/makemhr/loadsofa.cpp +++ b/utils/makemhr/loadsofa.cpp @@ -101,7 +101,6 @@ static float GetUniformStepSize(const double epsilon, const uint m, const float { auto steps = std::vector<float>(m, 0.0f); auto counts = std::vector<uint>(m, 0u); - float step{0.0f}; uint count{0u}; for(uint stride{1u};stride < m/2;stride++) @@ -140,15 +139,12 @@ static float GetUniformStepSize(const double epsilon, const uint m, const float count = 1; if(counts[0] > m/2) - { - step = steps[0]; - return step; - } + return steps[0]; } if(counts[0] > 5) - step = steps[0]; - return step; + return steps[0]; + return 0.0f; } /* Attempts to produce a compatible layout. Most data sets tend to be diff --git a/utils/sofa-info.cpp b/utils/sofa-info.cpp index e9f2257c..87531b37 100644 --- a/utils/sofa-info.cpp +++ b/utils/sofa-info.cpp @@ -136,7 +136,6 @@ static float GetUniformStepSize(const float epsilon, const uint m, const float * { std::vector<float> steps(m, 0.0f); std::vector<uint> counts(m, 0u); - float step{0.0f}; uint count{0u}; for(uint stride{1u};stride < m/2;stride++) @@ -175,15 +174,12 @@ static float GetUniformStepSize(const float epsilon, const uint m, const float * count = 1; if(counts[0] > m/2) - { - step = steps[0]; - return step; - } + return steps[0]; } if(counts[0] > 5) - step = steps[0]; - return step; + return steps[0]; + return 0.0f; } /* Attempts to produce a compatible layout. Most data sets tend to be |