Remove warnings

pull/2/head
Michael Scoff 7 years ago
parent af8b68d856
commit 000ebcc5db
  1. 6
      Trust/Vendors/BigInt/SMP Core.swift
  2. 4
      Trust/Vendors/BigInt/SMP String Module.swift

@ -2063,7 +2063,7 @@ public struct BDouble:
if let exp = nStr[Character("e")]
{
let beforeExp = String(nStr[0..<exp].characters.filter{ $0 != "." })
let beforeExp = String(nStr[0..<exp].filter{ $0 != "." })
var afterExp = nStr[(exp + 1)..<nStr.count]
var sign = false
@ -2314,9 +2314,9 @@ public extension String
/// If possible, returns index of first ocurrence of char.
subscript(char: Character) -> Int?
{
if let idx = self.characters.index(of: char)
if let idx = self.index(of: char)
{
return self.characters.distance(from: self.startIndex, to: idx)
return self.distance(from: self.startIndex, to: idx)
}
return nil
}

@ -31,7 +31,7 @@ private func convert(number: String, fromBase: Int, toBase: Int) -> String
var sum = BInt(0)
var multiplier = BInt(1)
for char in number.characters.reversed()
for char in number.reversed()
{
if let digit = chars.index(of: String(char))
{
@ -136,7 +136,7 @@ private func digitsToString(_ digits: Digits) -> String
var i = digits.count - 2
while i >= 0
{
var str = String(digits[i])
let str = String(digits[i])
var paddingZeros = String(
repeating: "0",

Loading…
Cancel
Save