BLI: fix printing name in print_stats methods of Map, Set and VectorSet
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -410,7 +410,7 @@ class Set {
|
||||
void print_stats(StringRef name = "") const
|
||||
{
|
||||
HashTableStats stats(*this, *this);
|
||||
stats.print();
|
||||
stats.print(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user