浏览代码

Use an int counter instead of TList

(Was experimenting and was using the list for some other stuff first)
Carl Husberg 5 年之前
父节点
当前提交
3448d6aaae
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/makedocs/makedocs.bmx

+ 4 - 4
src/makedocs/makedocs.bmx

@@ -123,7 +123,7 @@ Function docBmxFile( filePath$,docPath$ )
 	
 	Local Text$=LoadText( filepath )
 	
-	Local blocks:TList = CreateList()
+	Local blocks:Int = 0
 	
 	For Local line$=EachIn Text.Split( "~n" )
 
@@ -142,10 +142,10 @@ Function docBmxFile( filePath$,docPath$ )
 		
 		Select id
 		Case "type", "interface", "struct"
-			ListAddLast(blocks, id)
+			blocks :+ 1
 			
 		Case "endtype", "endinterface", "endstruct"
-			ListRemoveLast(blocks)
+			blocks :- 1
 			
 		EndSelect
 		
@@ -274,7 +274,7 @@ Function docBmxFile( filePath$,docPath$ )
 				
 				Local node:TDocNode=TDocNode.Create( id,path,kind, BuildProtoId(proto) )
 				
-				If(Not ListIsEmpty(blocks)) Then node.block = True
+				If(blocks) Then node.block = True
 				
 				node.proto=proto
 				node.bbdoc=bbdoc