Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused variables and type parameters #287

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading