浏览代码

chore: slice loop replace

guoguangwu 2 年之前
父节点
当前提交
29cf04713d
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      geometry/geometry.go

+ 1 - 4
geometry/geometry.go

@@ -95,10 +95,7 @@ func (g *Geometry) AddGroup(start, count, matIndex int) *Group {
 
 // AddGroupList adds the specified list of groups to this geometry.
 func (g *Geometry) AddGroupList(groups []Group) {
-
-	for _, group := range groups {
-		g.groups = append(g.groups, group)
-	}
+	g.groups = append(g.groups, groups...)
 }
 
 // GroupCount returns the number of geometry groups (for multimaterial).