-------------------------- HashString::GetStringDbg returns either the stored string or a numeric version if the latter is unavailable
| 133 | // returns either the stored string or a numeric version if the latter is unavailable |
| 134 | // |
| 135 | char const* HashString::ToStringDbg() const |
| 136 | { |
| 137 | #if ET_HASH_STRING_ENABLED |
| 138 | char const* const str = GetStoredString(); |
| 139 | if (str != nullptr) |
| 140 | { |
| 141 | return str; |
| 142 | } |
| 143 | else |
| 144 | { |
| 145 | #endif |
| 146 | |
| 147 | std::stringstream stream; |
| 148 | stream << "0x" << std::setfill('0') << std::setw(sizeof(T_Hash) * 2u) << std::hex << m_Hash; |
| 149 | s_LastStringResult = stream.str(); |
| 150 | return s_LastStringResult.c_str(); |
| 151 | |
| 152 | #if ET_HASH_STRING_ENABLED |
| 153 | } |
| 154 | #endif |
| 155 | } |
| 156 | |
| 157 | |
| 158 |
no test coverage detected