[Glacier] Add debug methods for HashMap and RefPtr.
This commit is contained in:
parent
d9a4be6555
commit
8c5dd00443
2 changed files with 33 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "glacier/string/str_format.h"
|
||||
|
||||
namespace glcr {
|
||||
|
||||
template <typename T>
|
||||
|
|
@ -100,4 +102,10 @@ RefPtr<T> StaticCastRefPtr(const RefPtr<U>& ref) {
|
|||
return RefPtr(static_cast<T*>(ref.get()), RefPtr<T>::DontAdopt);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void StrFormatValue(StringBuilder& builder, const RefPtr<T>& value,
|
||||
StringView opts) {
|
||||
StrFormatValue(builder, (uint64_t)value.get(), opts);
|
||||
}
|
||||
|
||||
} // namespace glcr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue