# Compilation: simplify \`totalErrorCount\` · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f0374fe3f04925a6e686077c2ffcb51b8eafc926)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f0374fe3f04925a6e686077c2ffcb51b8eafc926

Requested commit: f0374fe3f04925a6e686077c2ffcb51b8eafc926

Commit: f0374fe3f04925a6e686077c2ffcb51b8eafc926

Tree: 04156c9a729b5029a3682ff25fef088156addfdd

Author: mlugg

Committer: Jacob Young

## Message

```
Compilation: simplify `totalErrorCount`

This function now has to allocate anyway to resolve references, so we
may as well just build the error bundle and check its length.

Also remove some unnecessary calls of this function for efficiency.

```

## Parents

- [9e6318a4ea042e3fab7a1b2347600cde3d804e1a](https://git.cafe/gitcafe/zig/commit/9e6318a4ea042e3fab7a1b2347600cde3d804e1a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f0374fe3f04925a6e686077c2ffcb51b8eafc926?format=markdown)
