Skip to content

Commit

Permalink
Merge pull request boostorg#1194 from awulkiew/fix/centroid_average_w…
Browse files Browse the repository at this point in the history
…arning

[strategies] Fix msvc conversion warning in centroid::average
  • Loading branch information
vissarion authored Sep 8, 2023
2 parents 323b2ff + f52f182 commit 5663d76
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
// Copyright (c) 2017-2023 Adam Wulkiewicz, Lodz, Poland.

// This file was modified by Oracle on 2015-2021.
// Modifications copyright (c) 2015-2021 Oracle and/or its affiliates.
Expand Down Expand Up @@ -89,7 +89,8 @@ public :
centroid = state.centroid;
if ( state.count > 0 )
{
divide_value(centroid, state.count);
using coord_t = typename coordinate_type<ResultPoint>::type;
divide_value(centroid, static_cast<coord_t>(state.count));
return true;
}
return false;
Expand Down

0 comments on commit 5663d76

Please sign in to comment.