| 619 | } |
| 620 | |
| 621 | void HashStringAllocator::copyMultipartNoInline( |
| 622 | const StringView& srcStr, |
| 623 | char* group, |
| 624 | int32_t offset) { |
| 625 | const auto numBytes = srcStr.size(); |
| 626 | if (storeStringFast(srcStr.data(), numBytes, group + offset)) { |
| 627 | return; |
| 628 | } |
| 629 | // Write the string as non-contiguous chunks. |
| 630 | ByteOutputStream stream(this, false, false); |
| 631 | auto position = newWrite(stream, numBytes); |
| 632 | stream.appendStringView(srcStr); |
| 633 | finishWrite(stream, 0); |
| 634 | |
| 635 | // The stringView has a pointer to the first byte and the total |
| 636 | // size. Read with contiguousString(). |
| 637 | *reinterpret_cast<StringView*>(group + offset) = |
| 638 | StringView(reinterpret_cast<char*>(position.position), numBytes); |
| 639 | } |
| 640 | |
| 641 | std::string HashStringAllocator::toString() const { |
| 642 | std::ostringstream out; |
nothing calls this directly
no test coverage detected