summaryrefslogtreecommitdiff
path: root/speck.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-11-21 04:55:41 -0500
committerJeffrey Walton <noloader@gmail.com>2017-11-21 04:55:41 -0500
commit5007c13fbd585628d10e2a92b7e96702d66defcc (patch)
tree76f511051a651d7e71e3a577ddf26b9331067b9d /speck.cpp
parent78922e9c85abe04dea09188fc0006df55b29188e (diff)
downloadcryptopp-git-5007c13fbd585628d10e2a92b7e96702d66defcc.tar.gz
Switch to size_t for loop control
Diffstat (limited to 'speck.cpp')
-rw-r--r--speck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/speck.cpp b/speck.cpp
index a8d55fa9..b6eea409 100644
--- a/speck.cpp
+++ b/speck.cpp
@@ -57,7 +57,7 @@ inline void SPECK_Encrypt(W c[2], const W p[2], const W k[R])
c[0]=p[0]; c[1]=p[1];
// Don't unroll this loop. Things slow down.
- for(W i=0; static_cast<int>(i)<R; ++i)
+ for (size_t i=0; static_cast<int>(i)<R; ++i)
TF83(c[0], c[1], k[i]);
}
@@ -73,7 +73,7 @@ inline void SPECK_Decrypt(W p[2], const W c[2], const W k[R])
p[0]=c[0]; p[1]=c[1];
// Don't unroll this loop. Things slow down.
- for(W i=R-1; static_cast<int>(i)>=0; --i)
+ for (size_t i=R-1; static_cast<int>(i)>=0; --i)
TR83(p[0], p[1], k[i]);
}