Skip to content
Permalink
Browse files
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.
@@ -1,6 +1,7 @@
#pragma once

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

namespace HyoutaUtilities {
@@ -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();
}

@@ -1,6 +1,7 @@
#pragma once

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

@@ -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);
}

0 comments on commit 2f661fe

Please sign in to comment.