MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / writeString

Method writeString

Engine/source/core/stream/bitStream.cpp:737–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735}
736
737void BitStream::writeString(const char *string, S32 maxLen)
738{
739 if(!string)
740 string = "";
741 if(stringBuffer)
742 {
743 S32 j;
744 for(j = 0; j < maxLen && stringBuffer[j] == string[j] && string[j];j++)
745 ;
746 dStrncpy(stringBuffer, string, maxLen);
747 stringBuffer[maxLen] = 0;
748
749 if(writeFlag(j > 2))
750 {
751 writeInt(j, 8);
752 HuffmanProcessor::g_huffProcessor.writeHuffBuffer(this, string + j, maxLen - j);
753 return;
754 }
755 }
756 HuffmanProcessor::g_huffProcessor.writeHuffBuffer(this, string, maxLen);
757}
758
759void HuffmanProcessor::buildTables()
760{

Callers

nothing calls this directly

Calls 2

dStrncpyFunction · 0.85
writeHuffBufferMethod · 0.80

Tested by

no test coverage detected