fix: -Wtype-limits x2
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-01-09 12:31:16 +01:00
parent 795b9ffe54
commit 67c2462c3a
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ auto Generator::do_crypto() -> std::string {
auto Generator::generate_blocks(unsigned int k_blocks) -> std::string {
assert ((G.ctr!=0) && "Counter is not 0, generator has been seeded");
std::string r{""};
for (int i = 0; i < k_blocks; ++i) {
for (uint i = 0; i < k_blocks; ++i) {
r += do_crypto();
++G.ctr;
}

2
pool.h
View File

@ -32,7 +32,7 @@ public:
const size_t event_size{event.size()};
try {
if (source < 0 || source > 255) {
if (source > 255) {
throw std::invalid_argument("source number outside of interval <0,255>\n");
}
if (event_size < 1 || event_size > 32) {