From 7b7c095b37e85ca3a8f55eff1c3d9643d467b8e0 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 25 Apr 2023 10:43:29 -0400 Subject: Dictionary using lowerCamel (#2835) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP lowerCamel Dictionary. * WIP more lowerCamel fixes for Dictionary. * Add/Remove/Clear * GetValue/Contains * Fix tabs in dictionary. Count -> getCount * Fix fields with caps. * Key -> key Value -> value Use m_ for members where appropriate. Use lowerCamel in linked list. * Some small fixes/improvements to Dictionary. * Kick CI. --- source/slang/slang-serialize-ir.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/slang/slang-serialize-ir.cpp') diff --git a/source/slang/slang-serialize-ir.cpp b/source/slang/slang-serialize-ir.cpp index 062f1ed1a..d87fc38e2 100644 --- a/source/slang/slang-serialize-ir.cpp +++ b/source/slang/slang-serialize-ir.cpp @@ -27,10 +27,10 @@ static bool _isConstant(IROp opIn) void IRSerialWriter::_addInstruction(IRInst* inst) { // It cannot already be in the map - SLANG_ASSERT(!m_instMap.ContainsKey(inst)); + SLANG_ASSERT(!m_instMap.containsKey(inst)); // Add to the map - m_instMap.Add(inst, Ser::InstIndex(m_insts.getCount())); + m_instMap.add(inst, Ser::InstIndex(m_insts.getCount())); m_insts.add(inst); } @@ -117,7 +117,7 @@ Result IRSerialWriter::write(IRModule* module, SerialSourceLocWriter* sourceLocW m_insts.add(nullptr); // Reset - m_instMap.Clear(); + m_instMap.clear(); m_decorations.clear(); // Stack for parentInst @@ -135,7 +135,7 @@ Result IRSerialWriter::write(IRModule* module, SerialSourceLocWriter* sourceLocW // If it's in the stack it is assumed it is already in the inst map IRInst* parentInst = parentInstStack.getLast(); parentInstStack.removeLast(); - SLANG_ASSERT(m_instMap.ContainsKey(parentInst)); + SLANG_ASSERT(m_instMap.containsKey(parentInst)); // Okay we go through each of the children in order. If they are IRInstParent derived, we add to stack to process later // cos we want breadth first so the order of children is the same as their index order, meaning we don't need to store explicit indices @@ -145,7 +145,7 @@ Result IRSerialWriter::write(IRModule* module, SerialSourceLocWriter* sourceLocW for (IRInst* child : childrenList) { // This instruction can't be in the map... - SLANG_ASSERT(!m_instMap.ContainsKey(child)); + SLANG_ASSERT(!m_instMap.containsKey(child)); _addInstruction(child); @@ -168,8 +168,8 @@ Result IRSerialWriter::write(IRModule* module, SerialSourceLocWriter* sourceLocW { List workInsts; calcInstructionList(module, workInsts); - SLANG_ASSERT(workInsts.Count() == m_insts.Count()); - for (UInt i = 0; i < workInsts.Count(); ++i) + SLANG_ASSERT(workInsts.getCount() == m_insts.getCount()); + for (UInt i = 0; i < workInsts.getCount(); ++i) { SLANG_ASSERT(workInsts[i] == m_insts[i]); } -- cgit v1.2.3