| 274 | } |
| 275 | |
| 276 | const char* StringPool::AddString(const char* text) |
| 277 | { |
| 278 | auto* impl = CastImpl(m_impl); |
| 279 | auto it = impl->find(text); |
| 280 | if (it != impl->end()) |
| 281 | return *it; |
| 282 | |
| 283 | // _strdup doesn't go through allocator either |
| 284 | #if _MSC_VER |
| 285 | const char* dup = _strdup(text); |
| 286 | #else |
| 287 | const char* dup = strdup(text); |
| 288 | #endif |
| 289 | |
| 290 | impl->insert(dup); |
| 291 | return dup; |
| 292 | } |
| 293 | |
| 294 | const char* StringPool::PrintFormattedVaList(const char* fmt, va_list args) |
| 295 | { |
no test coverage detected