[algorithms][is_valid] in number_of_distinct_values, make size const

This commit is contained in:
Menelaos Karavelas
2014-06-18 13:06:10 +03:00
parent 4f40ffd313
commit ec63be14e2

View File

@@ -43,7 +43,7 @@ struct number_of_distinct_values
{
typedef typename boost::range_iterator<Range const>::type iterator;
std::size_t size = boost::size(range);
std::size_t const size = boost::size(range);
if ( size < 2u )
{
@@ -72,7 +72,7 @@ struct number_of_distinct_values<Range, N, false, NotEqualTo>
{
static inline std::size_t apply(Range const& range)
{
std::size_t size = boost::size(range);
std::size_t const size = boost::size(range);
return (size < N) ? size : N;
}
};