Appease MSVC Warning C4866: compiler may not enforce left-to-right evaluation order (#5953)

* Appease MSVC Warning C4866: compiler may not enforce left-to-right evaluation order

* Remove const qualifier

* Reword comment to be self-explanatory without PR context

The previous comment referenced the MSVC warning but didn't explain
why the code is structured as two statements. The revised comment
clarifies the intent: fetching the value first ensures well-defined
evaluation order.

* chore(deps): switch typos to mirror repo

Switch from crate-ci/typos to adhtruong/mirrors-typos because
pre-commit autoupdate confuses tags in the upstream repo, selecting
the mutable `v1` tag instead of pinned versions like `v1.41.0`.

See https://github.com/crate-ci/typos/issues/390

---------

Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
This commit is contained in:
Xuehai Pan
2026-01-08 08:28:38 +08:00
committed by GitHub
parent 745e5688e7
commit d36f5dd5a4
2 changed files with 8 additions and 3 deletions

View File

@@ -119,8 +119,10 @@ repos:
args: ["-x.codespell-ignore-lines", "-Lccompiler,intstruct"]
# Also check spelling
- repo: https://github.com/crate-ci/typos
rev: v1
# Use mirror because pre-commit autoupdate confuses tags in the upstream repo.
# See https://github.com/crate-ci/typos/issues/390
- repo: https://github.com/adhtruong/mirrors-typos
rev: "v1.41.0"
hooks:
- id: typos
args: []