Skip to content

Commit

Permalink
Remove two inlines slowing down GLTF TTFX and bloating compiled dll s…
Browse files Browse the repository at this point in the history
…ize (#282)
  • Loading branch information
jaakkor2 authored Oct 16, 2024
1 parent 4856272 commit 5e4717e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/structs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ end
@inline read(::ArrayType, buf, pos, len, b, ::Type{T}, ::Type{eT}; kw...) where {T, eT} = readarray(buf, pos, len, b, T, eT; kw...)
read(::ArrayType, buf, pos, len, b, ::Type{Tuple}, ::Type{eT}; kw...) where {eT} = readarray(buf, pos, len, b, Tuple, eT; kw...)

@inline function readarray(buf, pos, len, b, ::Type{T}, ::Type{eT}; kw...) where {T, eT}
function readarray(buf, pos, len, b, ::Type{T}, ::Type{eT}; kw...) where {T, eT}
if b != UInt8('[')
error = ExpectedOpeningArrayChar
@goto invalid
Expand Down Expand Up @@ -460,7 +460,7 @@ end
throw(ArgumentError("read! is only defined when T is of the `Mutable` struct type"))
end

@inline function read!(::Mutable, buf, pos, len, b, ::Type{T}, x::T; kw...) where {T}
function read!(::Mutable, buf, pos, len, b, ::Type{T}, x::T; kw...) where {T}
if b != UInt8('{')
error = ExpectedOpeningObjectChar
@goto invalid
Expand Down

0 comments on commit 5e4717e

Please sign in to comment.