BLI: fix printing name in print_stats methods of Map, Set and VectorSet

This commit is contained in:
2020-06-11 11:21:37 +02:00
parent 665acd2903
commit 95aa8ffed5
4 changed files with 6 additions and 5 deletions

View File

@@ -30,6 +30,7 @@
#include "BLI_math_base.h"
#include "BLI_memory_utils.hh"
#include "BLI_string.h"
#include "BLI_string_ref.hh"
#include "BLI_utildefines.h"
#include "BLI_vector.hh"

View File

@@ -843,7 +843,7 @@ class Map {
void print_stats(StringRef name = "") const
{
HashTableStats stats(*this, this->keys());
stats.print();
stats.print(name);
}
/**
@@ -894,7 +894,7 @@ class Map {
*/
uint32_t size_in_bytes() const
{
return sizeof(Slot) * m_slots.size();
return (uint32_t)(sizeof(Slot) * m_slots.size());
}
/**

View File

@@ -410,7 +410,7 @@ class Set {
void print_stats(StringRef name = "") const
{
HashTableStats stats(*this, *this);
stats.print();
stats.print(name);
}
/**

View File

@@ -433,7 +433,7 @@ class VectorSet {
void print_stats(StringRef name = "") const
{
HashTableStats stats(*this, this->as_span());
stats.print();
stats.print(name);
}
/**
@@ -482,7 +482,7 @@ class VectorSet {
*/
uint32_t size_in_bytes() const
{
return sizeof(Slot) * m_slots.size() + sizeof(Key) * m_usable_slots;
return (uint32_t)(sizeof(Slot) * m_slots.size() + sizeof(Key) * m_usable_slots);
}
/**