mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
fix bug exposed by example by Robert White
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2103bc3831
commit
ac7fffa9cb
3 changed files with 28 additions and 22 deletions
|
@ -52,7 +52,7 @@ namespace hash_space {
|
|||
class hash<std::string> {
|
||||
public:
|
||||
size_t operator()(const std::string &s) const {
|
||||
return string_hash(s.c_str(), s.size(), 0);
|
||||
return string_hash(s.c_str(), static_cast<unsigned>(s.size()), 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -374,7 +374,7 @@ namespace hash_space {
|
|||
void resize(size_t new_size) {
|
||||
const size_t old_n = buckets.size();
|
||||
if (new_size <= old_n) return;
|
||||
const size_t n = next_prime(new_size);
|
||||
const size_t n = next_prime(static_cast<unsigned>(new_size));
|
||||
if (n <= old_n) return;
|
||||
Table tmp(n, (Entry*)(0));
|
||||
for (size_t i = 0; i < old_n; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue