Skip to content

Commit 086ee65

Browse files
HanatoKlevo-str
authored andcommitted
fix: change the type of nb_averaged_gradients from size_t to int
Fix the compilation error of comparing signed and unsigned integers.
1 parent 1ecb25b commit 086ee65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/colvargrid_integrate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ std::vector<cvm::real> colvargrid_integrate::compute_averaged_border_normal_grad
10711071
}
10721072
}
10731073
// Find the positions of the gradients to average
1074-
size_t nb_averaged_gradients = static_cast<int>(cvm::integer_power(2, static_cast<int>(directions_to_average_along.size())));
1074+
const int nb_averaged_gradients = static_cast<int>(cvm::integer_power(2, static_cast<int>(directions_to_average_along.size())));
10751075
std::vector<std::vector<int>> gradients_to_average_relative_positions;
10761076
if (directions_to_average_along.size() == 0) {
10771077
std::vector<int> zero_vector(nd, 0);

0 commit comments

Comments
 (0)