瀏覽代碼

Remove initialization on static atomic

gingerBill 2 年之前
父節點
當前提交
b51be71a6f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/llvm_backend.cpp

+ 1 - 1
src/llvm_backend.cpp

@@ -304,7 +304,7 @@ gb_internal lbValue lb_hasher_proc_for_type(lbModule *m, Type *type) {
 		return {(*found)->value, (*found)->type};
 	}
 
-	static std::atomic<u32> proc_index = 0;
+	static std::atomic<u32> proc_index;
 
 	char buf[32] = {};
 	isize n = gb_snprintf(buf, 32, "__$hasher%u", 1+proc_index.fetch_add(1));