MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / ContinueString

Method ContinueString

include/vk_mem_alloc.h:6158–6199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6156}
6157
6158void VmaJsonWriter::ContinueString(const char* pStr)
6159{
6160 VMA_ASSERT(m_InsideString);
6161
6162 const size_t strLen = strlen(pStr);
6163 for (size_t i = 0; i < strLen; ++i)
6164 {
6165 char ch = pStr[i];
6166 if (ch == '\\')
6167 {
6168 m_SB.Add("\\\\");
6169 }
6170 else if (ch == '"')
6171 {
6172 m_SB.Add("\\\"");
6173 }
6174 else if ((uint8_t)ch >= 32)
6175 {
6176 m_SB.Add(ch);
6177 }
6178 else switch (ch)
6179 {
6180 case '\b':
6181 m_SB.Add("\\b");
6182 break;
6183 case '\f':
6184 m_SB.Add("\\f");
6185 break;
6186 case '\n':
6187 m_SB.Add("\\n");
6188 break;
6189 case '\r':
6190 m_SB.Add("\\r");
6191 break;
6192 case '\t':
6193 m_SB.Add("\\t");
6194 break;
6195 default:
6196 VMA_ASSERT(0 && "Character not currently supported.");
6197 }
6198 }
6199}
6200
6201void VmaJsonWriter::ContinueString(uint32_t n)
6202{

Callers 2

PrintDetailedMapMethod · 0.80
vmaBuildStatsStringFunction · 0.80

Calls 2

AddNumberMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected