Merge pull request #40 from kevindeleon/patch-1
Corrects code that would fail due to type mismatch
This commit is contained in:
Коммит
63b35a8f7f
|
@ -190,7 +190,7 @@ class Vehicle {
|
|||
}
|
||||
|
||||
func maximumTotalTirePressure(pressurePerWheel: Float) -> Float {
|
||||
return pressurePerWheel * numberOfWheels
|
||||
return pressurePerWheel * Float(numberOfWheels)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ protocol Vehicle {
|
|||
}
|
||||
|
||||
func maximumTotalTirePressure(vehicle: Vehicle, pressurePerWheel: Float) -> Float {
|
||||
return pressurePerWheel * vehicle.numberOfWheels
|
||||
return pressurePerWheel * Float(vehicle.numberOfWheels)
|
||||
}
|
||||
|
||||
struct Bicycle: Vehicle {
|
||||
|
|
Загрузка…
Ссылка в новой задаче