Skip to content

Commit 796bd9d

Browse files
authored
[ML] Clean shadow warnings (#46)
1 parent d50c229 commit 796bd9d

19 files changed

+7
-39
lines changed

include/core/CStringSimilarityTester.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ class CORE_EXPORT CStringSimilarityTester : private CNonCopyable {
231231
// one go for efficiency. Then the current and previous column
232232
// pointers alternate between pointing and the first and second half
233233
// of the memory block.
234-
using TScopedSizeArray = boost::scoped_array<size_t>;
235234
TScopedSizeArray data(new size_t[(secondLen + 1) * 2]);
236235
size_t* currentCol(data.get());
237236
size_t* prevCol(currentCol + (secondLen + 1));

include/maths/CXMeansOnline.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,8 @@ class CXMeansOnline : public CClusterer<CVectorNx1<T, N>> {
787787
this->cluster(x, clusters, count);
788788
}
789789
} else {
790-
using TSizeDoublePr = std::pair<double, std::size_t>;
791-
using TMaxAccumulator = CBasicStatistics::COrderStatisticsStack<TSizeDoublePr, 2, std::greater<TSizeDoublePr>>;
790+
using TDoubleSizePr = std::pair<double, std::size_t>;
791+
using TMaxAccumulator = CBasicStatistics::COrderStatisticsStack<TDoubleSizePr, 2, std::greater<TDoubleSizePr>>;
792792

793793
TMaxAccumulator closest;
794794
for (std::size_t i = 0u; i < m_Clusters.size(); ++i) {

lib/core/unittest/CMemoryUsageTest.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,6 @@ void CMemoryUsageTest::testStringClear() {
987987

988988
void CMemoryUsageTest::testSharedPointer() {
989989
LOG_DEBUG("*** testSharedPointer ***");
990-
using TIntVec = std::vector<int>;
991990
using TIntVecPtr = boost::shared_ptr<TIntVec>;
992991
using TIntVecPtrVec = std::vector<TIntVecPtr>;
993992
using TStrPtr = boost::shared_ptr<std::string>;

lib/maths/CBjkstUniqueValues.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,7 @@ void CBjkstUniqueValues::SSketch::remove(uint32_t value) {
572572
}
573573

574574
uint32_t CBjkstUniqueValues::SSketch::number() const {
575-
using TUInt32Vec = std::vector<uint32_t>;
576-
577575
// This uses the median trick to reduce the error.
578-
579576
TUInt32Vec estimates;
580577
estimates.reserve(s_Z.size());
581578
for (std::size_t i = 0u; i < s_Z.size(); ++i) {

lib/maths/COneOfNPrior.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,11 +837,11 @@ bool COneOfNPrior::probabilityOfLessLikelySamples(maths_t::EProbabilityCalculati
837837
// P(m) is the prior probability the data are from the m'th model.
838838

839839
using TDoubleTailPr = std::pair<double, maths_t::ETail>;
840-
using TMaxAccumulator = CBasicStatistics::SMax<TDoubleTailPr>::TAccumulator;
840+
using TDoubleTailPrMaxAccumulator = CBasicStatistics::SMax<TDoubleTailPr>::TAccumulator;
841841

842842
TDoubleSizePr5Vec logWeights = this->normalizedLogWeights();
843843

844-
TMaxAccumulator tail_;
844+
TDoubleTailPrMaxAccumulator tail_;
845845
for (std::size_t i = 0u; i < logWeights.size(); ++i) {
846846
double weight = std::exp(logWeights[i].first);
847847
const CPrior& model = *m_Models[logWeights[i].second].second;

lib/maths/CStatisticalTests.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,6 @@ void CStatisticalTests::CCramerVonMises::acceptPersistInserter(core::CStatePersi
174174
}
175175

176176
void CStatisticalTests::CCramerVonMises::addF(double f) {
177-
using TDoubleVec = std::vector<double>;
178-
179177
if (m_F.size() == m_Size) {
180178
TDoubleVec ff;
181179
ff.reserve(m_F.size() + 1);

lib/maths/unittest/CKMeansFastTest.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ void CKMeansFastTest::testClosestPoints() {
369369
// Check the obvious invariant that the closest point to each
370370
// centre is closer to that centre than any other.
371371

372-
using TVector2VecVec = std::vector<TVector2Vec>;
373372
using TVector4VecVec = std::vector<TVector4Vec>;
374373

375374
test::CRandomNumbers rng;

lib/maths/unittest/CMultimodalPriorTest.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ void CMultimodalPriorTest::testPropagation() {
181181
// mean and the marginal likelihood confidence intervals increase
182182
// (due to influence of the prior uncertainty) after propagation.
183183

184-
using TDoubleDoublePr = std::pair<double, double>;
185-
186184
double eps = 0.01;
187185

188186
test::CRandomNumbers rng;

lib/maths/unittest/CMultivariateMultimodalPriorTest.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,6 @@ void CMultivariateMultimodalPriorTest::testSplitAndMerge() {
388388

389389
// Test clustering which changes over time.
390390

391-
using TDoubleVecVecVec = std::vector<TDoubleVecVec>;
392-
393391
maths::CSampling::seed();
394392

395393
test::CRandomNumbers rng;

lib/maths/unittest/CMultivariateOneOfNPriorTest.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,6 @@ void CMultivariateOneOfNPriorTest::testMarginalLikelihoodMean() {
637637

638638
using TSizeVec = std::vector<std::size_t>;
639639
using TSizeVecVec = std::vector<TSizeVec>;
640-
using TMeanAccumulator = maths::CBasicStatistics::SSampleMean<double>::TAccumulator;
641640
using TMean2Accumulator = maths::CBasicStatistics::SSampleMean<TVector2>::TAccumulator;
642641

643642
maths::CSampling::seed();

0 commit comments

Comments
 (0)