We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05a347b commit 2cb1b27Copy full SHA for 2cb1b27
src/PtrArrays.jl
@@ -40,14 +40,13 @@ checked_dims(elsize::Int; message) = elsize
40
function checked_dims(elsize::Int, d0::Int, d::Int...; message)
41
len = checked_size_product((d0, d...))
42
ok = len !== nothing
43
- local overflow_final
44
if ok
45
- len, overflow_final = Base.mul_with_overflow(len, elsize)
+ len_final, overflow_final = Base.mul_with_overflow(len, elsize)
+ if !overflow_final
46
+ return len_final
47
+ end
48
end
- if !ok || overflow_final
- throw_invalid_dimensions(message)
49
- end
50
- len
+ throw_invalid_dimensions(message)
51
52
53
"""
0 commit comments