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

Method BeginValue

include/vk_mem_alloc.h:6258–6285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6256}
6257
6258void VmaJsonWriter::BeginValue(bool isString)
6259{
6260 if (!m_Stack.empty())
6261 {
6262 StackItem& currItem = m_Stack.back();
6263 if (currItem.type == COLLECTION_TYPE_OBJECT &&
6264 currItem.valueCount % 2 == 0)
6265 {
6266 VMA_ASSERT(isString);
6267 }
6268
6269 if (currItem.type == COLLECTION_TYPE_OBJECT &&
6270 currItem.valueCount % 2 != 0)
6271 {
6272 m_SB.Add(": ");
6273 }
6274 else if (currItem.valueCount > 0)
6275 {
6276 m_SB.Add(", ");
6277 WriteIndent();
6278 }
6279 else
6280 {
6281 WriteIndent();
6282 }
6283 ++currItem.valueCount;
6284 }
6285}
6286
6287void VmaJsonWriter::WriteIndent(bool oneLess)
6288{

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected