From 12799c561691ca8d15cd3454bae1d427f5dc6feb Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Sat, 27 Jun 2020 16:00:12 -0400 Subject: [PATCH] fix lgtm errors --- ciphers/hill_cipher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ciphers/hill_cipher.cpp b/ciphers/hill_cipher.cpp index 45315e088..1fef0f32e 100644 --- a/ciphers/hill_cipher.cpp +++ b/ciphers/hill_cipher.cpp @@ -115,7 +115,7 @@ class HillCipher { * should be no more than \f$[0,10]\f$ */ template - static const double rand_range(matrix *M, T1 a, T1 b) { + static double rand_range(matrix *M, T1 a, T1 b) { for (size_t i = 0; i < M->size(); i++) { for (size_t j = 0; j < M[0][0].size(); j++) { M[0][i][j] = rand_range(a, b); @@ -190,7 +190,7 @@ class HillCipher { static inline uint8_t get_char_idx(const char ch) { size_t L = std::strlen(STRKEY); - for (uint8_t idx = 0; idx <= L; idx++) + for (size_t idx = 0; idx <= L; idx++) if (STRKEY[idx] == ch) return idx;