瀏覽代碼

Elide unnecessary condition

Jeroen van Rijn 1 年之前
父節點
當前提交
908a6ff2d4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/math/big/internal.odin

+ 1 - 1
core/math/big/internal.odin

@@ -2187,7 +2187,7 @@ internal_int_grow :: proc(a: ^Int, digits: int, allow_shrink := false, allocator
 			`[dynamic]DIGIT` already knows what allocator was used for it, so resize will do the right thing.
 		*/
 		resize(&a.digit, needed)
-	} else if cap > needed && allow_shrink {
+	} else if cap > needed {
 		/*
 			Same applies to builtin.shrink here as resize above
 		*/