[Glacier] Add debug methods for HashMap and RefPtr.

This commit is contained in:
Drew Galbraith 2023-12-02 13:25:28 -08:00
parent d9a4be6555
commit 8c5dd00443
2 changed files with 33 additions and 0 deletions

View file

@ -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