From 08b4ff949f376b99a87689027eb93fd88ff4f014 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 12 Feb 2023 15:16:14 +0100 Subject: [PATCH] Fixed warnings in MLPPTransforms. --- mlpp/transforms/transforms.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mlpp/transforms/transforms.cpp b/mlpp/transforms/transforms.cpp index cecf9af..c92f827 100644 --- a/mlpp/transforms/transforms.cpp +++ b/mlpp/transforms/transforms.cpp @@ -18,14 +18,14 @@ std::vector> MLPPTransforms::discreteCosineTransform(std::ve std::vector> B; B.resize(A.size()); - for (int i = 0; i < B.size(); i++) { + for (uint32_t i = 0; i < B.size(); i++) { B[i].resize(A[i].size()); } int M = A.size(); - for (int i = 0; i < B.size(); i++) { - for (int j = 0; j < B[i].size(); j++) { + for (uint32_t i = 0; i < B.size(); i++) { + for (uint32_t j = 0; j < B[i].size(); j++) { real_t sum = 0; real_t alphaI; if (i == 0) { @@ -40,8 +40,8 @@ std::vector> MLPPTransforms::discreteCosineTransform(std::ve alphaJ = std::sqrt(real_t(2) / real_t(M)); } - for (int k = 0; k < B.size(); k++) { - for (int f = 0; f < B[k].size(); f++) { + for (uint32_t k = 0; k < B.size(); k++) { + for (uint32_t f = 0; f < B[k].size(); f++) { sum += A[k][f] * std::cos((M_PI * i * (2 * k + 1)) / (2 * M)) * std::cos((M_PI * j * (2 * f + 1)) / (2 * M)); } }