Use { and } around the conditionally-executed statement

Co-authored-by: compilade <git@compilade.net>
This commit is contained in:
Ed Addario 2025-08-17 08:08:26 +01:00 committed by GitHub
parent 97d839c441
commit d19e6c9afa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ static bool compute_vector_statistics(std::vector<tensor_statistics> & tstats, c
if (div > 0.0) { if (div > 0.0) {
for (float w : weights) { for (float w : weights) {
const float p = w / div; const float p = w / div;
if (p > 0.0) entropy -= p * std::log2(p); if (p > 0.0) { entropy -= p * std::log2(p); }
} }
} }
} }