Skip to content

Commit fba550b

Browse files
committed
style: pre-commit
1 parent ad77bcc commit fba550b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/blog/posts/preventing-integer-overflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ The two mechanisms have different scopes:
698698
be opted out using `ignore(OVERFLOW_RISK)`, **there is no way to specify opt-outs for
699699
implicit conversions** — this means false positives in automatic common-unit scaling
700700
cannot be bypassed, potentially blocking valid operations.
701-
701+
702702
- **`is_conversion_lossy` and related checkers**: Focus on **explicit** conversion calls
703703
made by the user. They check the actual runtime value to determine if *that specific*
704704
conversion would overflow or truncate, allowing precise per-value validation.
@@ -737,7 +737,7 @@ promotes to `int64_t` for the product), so there is no dependency on UB.
737737
paramount or integer types are subject to promotion (`int8_t`, `int16_t`) — this cost
738738
is well worth paying. However, users should be aware of the performance trade-off:
739739
safety comes at the cost of additional instructions per operation.
740-
740+
741741
The overhead is typically small (a few extra comparisons or branches per operation), but
742742
in tight inner loops with millions of iterations, it can be measurable. Profile your
743743
specific use case to determine if the safety benefit justifies the performance cost.

0 commit comments

Comments
 (0)