mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 00:49:08 +00:00
chore(hash): line up HASHKEY_PTR and HASHKEY_STR ctor with verified behavior
This commit is contained in:
parent
adc8cb6200
commit
2e044682e1
3 changed files with 37 additions and 3 deletions
|
|
@ -6,6 +6,10 @@ bool HASHKEY_NONE::operator==(const HASHKEY_NONE& key) {
|
|||
return true;
|
||||
}
|
||||
|
||||
HASHKEY_PTR::HASHKEY_PTR() {
|
||||
this->m_key = nullptr;
|
||||
}
|
||||
|
||||
HASHKEY_PTR::HASHKEY_PTR(void* key) {
|
||||
this->m_key = key;
|
||||
}
|
||||
|
|
@ -14,6 +18,14 @@ bool HASHKEY_PTR::operator==(const HASHKEY_PTR& key) {
|
|||
return this->m_key == key.m_key;
|
||||
}
|
||||
|
||||
HASHKEY_STR::HASHKEY_STR() {
|
||||
this->m_str = nullptr;
|
||||
}
|
||||
|
||||
HASHKEY_STR::HASHKEY_STR(const char* str) {
|
||||
this->m_str = SStrDupA(str, __FILE__, __LINE__);
|
||||
}
|
||||
|
||||
HASHKEY_STR::~HASHKEY_STR() {
|
||||
if (this->m_str) {
|
||||
SMemFree(this->m_str, __FILE__, __LINE__, 0x0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue