Skip to content

Commit

Permalink
fix integer signed/unsigned compare warning with g++ (#944)
Browse files Browse the repository at this point in the history
* Remove signed/unsigned integer compare warning with g++
  • Loading branch information
olofer authored and huanzhang12 committed Sep 29, 2017
1 parent f90dfaf commit 6068ba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/LightGBM/utils/random.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Random {
}
} else {
std::set<int> sample_set;
while (sample_set.size() < K) {
while (static_cast<int>(sample_set.size()) < K) {
int next = RandInt32() % N;
if (sample_set.count(next) == 0) {
sample_set.insert(next);
Expand Down

0 comments on commit 6068ba5

Please sign in to comment.