updated types
This commit is contained in:
parent
6427c7681c
commit
489f132e77
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ module Lifo
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def size : Int
|
def size : Int32
|
||||||
@data.size
|
@data.size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ module Lifo
|
||||||
super(capacity)
|
super(capacity)
|
||||||
end
|
end
|
||||||
|
|
||||||
def push(e : T) : Int32
|
def push(e : T) : Int
|
||||||
if @capacity == -1 || size < @capacity
|
if @capacity == -1 || size < @capacity
|
||||||
@data << e
|
@data << e
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ module Lifo
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def push?(e : T) : Int32?
|
def push?(e : T) : Int?
|
||||||
begin
|
begin
|
||||||
push(e)
|
push(e)
|
||||||
rescue OverflowError
|
rescue OverflowError
|
||||||
|
|
Loading…
Reference in a new issue