Skip to content

Commit

Permalink
remove unused variables and type parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Mar 1, 2024
1 parent 6fd2578 commit f3497ee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/identity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function Base.getindex(𝐼::IdentityMultiple{T}, ind) where {T}
end
end

function Base.setindex!(𝐼::IdentityMultiple, X, inds...)
function Base.setindex!(::IdentityMultiple, ::Any, inds...)
return error("cannot store a value in an `IdentityMultiple` because this type is immutable")
end

Expand Down
2 changes: 1 addition & 1 deletion src/inputs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct ConstantInput{UT} <: AbstractInput
end

Base.eltype(::Type{ConstantInput{UT}}) where {UT} = UT
Base.iterate(input::ConstantInput, state::Union{Int,Nothing}=nothing) = (input.U, nothing)
Base.iterate(input::ConstantInput, ::Union{Int,Nothing}=nothing) = (input.U, nothing)
Base.IteratorSize(::Type{<:ConstantInput}) = Base.IsInfinite()

# the following does not need to be defined because it is the default:
Expand Down
2 changes: 1 addition & 1 deletion src/maps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ outputdim(m::IdentityMap) = m.dim
inputdim(::IdentityMap) = 0
islinear(::IdentityMap) = true
isaffine(::IdentityMap) = true
apply(m::IdentityMap, x) = x
apply(::IdentityMap, x) = x

"""
ConstrainedIdentityMap
Expand Down
4 changes: 2 additions & 2 deletions src/systems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -903,10 +903,10 @@ for (Z, AZ) in ((:ConstrainedPolynomialContinuousSystem, :AbstractContinuousSyst
MultivariatePolynomials.variables(s::$Z) = MultivariatePolynomials.variables(s.p)
MultivariatePolynomials.nvariables(s::$Z) = s.statedim

function $Z(p::AbstractVector{<:AbstractPolynomialLike}, X::ST) where {ST}
function $Z(p::AbstractVector{<:AbstractPolynomialLike}, X)
return $(Z)(p, MultivariatePolynomials.nvariables(p), X)
end
$Z(p::AbstractPolynomialLike, X::ST) where {ST} = $(Z)([p], X)
$Z(p::AbstractPolynomialLike, X) = $(Z)([p], X)
end
for T in [Z, Type{<:eval(Z)}]
@eval begin
Expand Down

0 comments on commit f3497ee

Please sign in to comment.