Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9462 from trofi/master
Externals/rangeset: use qualified 'size_t'
  • Loading branch information
leoetlino committed Jan 28, 2021
2 parents a8adaa4 + 8cfc41f commit 2f661fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Externals/rangeset/include/rangeset/rangeset.h
@@ -1,6 +1,7 @@
#pragma once

#include <cassert>
#include <cstddef>
#include <map>

namespace HyoutaUtilities {
Expand Down Expand Up @@ -217,7 +218,7 @@ template <typename T> class RangeSet {
return get_from(it) <= value && value < get_to(it);
}

size_t size() const {
std::size_t size() const {
return Map.size();
}

Expand Down
5 changes: 3 additions & 2 deletions Externals/rangeset/include/rangeset/rangesizeset.h
@@ -1,6 +1,7 @@
#pragma once

#include <cassert>
#include <cstddef>
#include <map>
#include <type_traits>

Expand Down Expand Up @@ -322,15 +323,15 @@ template <typename T> class RangeSizeSet {
return get_from(it) <= value && value < get_to(it);
}

size_t size() const {
std::size_t size() const {
return Map.size();
}

bool empty() const {
return Map.empty();
}

size_t by_size_count(const SizeT& key) const {
std::size_t by_size_count(const SizeT& key) const {
return Sizes.count(key);
}

Expand Down

0 comments on commit 2f661fe

Please sign in to comment.