From 9b3e768bceae562deeb330067f3ef5febc2e5244 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 11 Feb 2020 16:16:43 -0500 Subject: Small improvements around List (#1216) * * Improved fastRemoveAt * Fixed off by one bug * Fixed const safeness with List<> * Made List begin and end const safe. * Revert to previous RefPtr usage. * Fix bug with casting. * Tabs -> spaces. Small fixes/improvements to List. * Improve comment on List. * hasContent -> isNonEmpty --- source/slang/slang-check-decl.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source/slang/slang-check-decl.cpp') diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index f8df46ff7..a37d80ae8 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -2559,7 +2559,7 @@ namespace Slang } funcDecl->ReturnType = resultType; - for (auto & para : funcDecl->GetParameters()) + for (auto& para : funcDecl->GetParameters()) { ensureDecl(para, DeclCheckState::ReadyForReference); } @@ -2779,11 +2779,7 @@ namespace Slang // subscript(uint index) -> T { get; } // - bool anyAccessors = false; - for(auto accessorDecl : decl->getMembersOfType()) - { - anyAccessors = true; - } + bool anyAccessors = decl->getMembersOfType().isNonEmpty(); if(!anyAccessors) { -- cgit v1.2.3