diff --git a/dlib/manifold_regularization/graph_creation.h b/dlib/manifold_regularization/graph_creation.h index 23ee77d10..06d574261 100644 --- a/dlib/manifold_regularization/graph_creation.h +++ b/dlib/manifold_regularization/graph_creation.h @@ -122,7 +122,7 @@ namespace dlib std::sort(out.begin(), out.end(), &order_by_distance); out.swap(edges); - const unsigned long out_size = std::min(num*percent, edges.size()); + const unsigned long out_size = std::min((unsigned long)num*percent, edges.size()); out.assign(edges.begin(), edges.begin() + out_size); } }