Skip to content

Commit

Permalink
Merge pull request swiftlang#3592 from practicalswift/trailing-semicolon
Browse files Browse the repository at this point in the history
[gardening] Remove trailing semicolons.
  • Loading branch information
lattner authored Jul 20, 2016
2 parents 7fec6ec + 8287c5d commit bc09af3
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion benchmark/single-source/Ackermann.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func Ackermann(_ M: Int, _ N : Int) -> Int {
return ackermann(M - 1, ackermann(M, N - 1))
}

let ref_result = [5, 13, 29, 61, 125, 253, 509, 1021, 2045, 4093, 8189, 16381, 32765, 65533, 131069];
let ref_result = [5, 13, 29, 61, 125, 253, 509, 1021, 2045, 4093, 8189, 16381, 32765, 65533, 131069]

@inline(never)
public func run_Ackermann(_ N: Int) {
Expand Down
4 changes: 2 additions & 2 deletions benchmark/single-source/DictTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public func run_Dictionary(scale: Int) {
for _ in 1...N {
Dict = [:]
for word in Input {
Dict[word] = true;
Dict[word] = true
}
}
CheckResults(Dict.count == 270,
Expand Down Expand Up @@ -272,7 +272,7 @@ public func run_DictionaryOfObjects(scale: Int) {
for _ in 1...N {
Dict = [:]
for word in Input {
Dict[Box(word)] = Box(true);
Dict[Box(word)] = Box(true)
}
}
CheckResults(Dict.count == 270,
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/Histogram.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,5 @@ let samples: [rrggbb_t] = [

@inline(never)
public func run_Histogram(_ N: Int) {
output_sorted_sparse_rgb_histogram(samples, N);
output_sorted_sparse_rgb_histogram(samples, N)
}
8 changes: 4 additions & 4 deletions benchmark/single-source/Integrate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import TestsUtils
// The program performs integration via Gaussian Quadrature

class Integrate {
static let epsilon = 1.0e-9;
static let epsilon = 1.0e-9

let fun: (Double) -> Double;
let fun: (Double) -> Double

init (f: (Double) -> Double) {
fun = f;
fun = f
}

private func recEval(_ l: Double, fl: Double, r: Double, fr: Double, a: Double) -> Double {
Expand Down Expand Up @@ -50,7 +50,7 @@ class Integrate {

@inline(never)
public func run_Integrate(_ N: Int) {
let obj = Integrate(f: { x in (x*x + 1.0) * x});
let obj = Integrate(f: { x in (x*x + 1.0) * x})
let left = 0.0
let right = 10.0
let ref_result = 2550.0
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/NopDeinit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class X<T : Comparable> {
init(_ x : T) {elem = x}
deinit {
for _ in 1...deinitIters {
if (elem > elem) { };
if (elem > elem) { }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/single-source/Phonebook.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public func run_Phonebook(_ N: Int) {
}
}
for _ in 1...N {
var t = Names;
var t = Names
t.sort()
}
}
2 changes: 1 addition & 1 deletion benchmark/single-source/PolymorphicCalls.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class B {
public class A1 {
let b: B1
public init(b:B1) {
self.b = b;
self.b = b
}
public func run1() -> Int {
return b.f1() + b.f2() + b.f3()
Expand Down
4 changes: 2 additions & 2 deletions benchmark/single-source/SetTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public func run_SetIsSubsetOf(_ N: Int) {
otherSet.insert(Int(truncatingBitPattern: Random()))
}

var isSubset = false;
var isSubset = false
for _ in 0 ..< N * 5000 {
isSubset = set.isSubset(of: otherSet)
if isSubset {
Expand Down Expand Up @@ -137,7 +137,7 @@ public func run_SetIsSubsetOf_OfObjects(_ N: Int) {
otherSet.insert(Box(Int(truncatingBitPattern: Random())))
}

var isSubset = false;
var isSubset = false
for _ in 0 ..< N * 5000 {
isSubset = set.isSubset(of: otherSet)
if isSubset {
Expand Down
6 changes: 3 additions & 3 deletions stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Darwin
let RequestInstanceKind = "k"
let RequestInstanceAddress = "i"
let RequestReflectionInfos = "r"
let RequestReadBytes = "b";
let RequestReadBytes = "b"
let RequestSymbolAddress = "s"
let RequestStringLength = "l"
let RequestDone = "d"
Expand Down Expand Up @@ -282,9 +282,9 @@ internal func reflect(instanceAddress: UInt, kind: InstanceKind) {
case String(validatingUTF8: RequestStringLength)!:
sendStringLength()
case String(validatingUTF8: RequestPointerSize)!:
sendPointerSize();
sendPointerSize()
case String(validatingUTF8: RequestDone)!:
return;
return
default:
fatalError("Unknown request received: '\(Array(command.utf8))'!")
}
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/SDK/Dispatch/Data.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public struct DispatchData : RandomAccessCollection, _ObjectiveCBridgeable {
body: @noescape (UnsafePointer<ContentType>) throws -> Result) rethrows -> Result
{
var ptr: UnsafePointer<Void>? = nil
var size = 0;
var size = 0
let data = __dispatch_data_create_map(__wrapped, &ptr, &size)
defer { _fixLifetime(data) }
return try body(UnsafePointer<ContentType>(ptr!))
Expand Down Expand Up @@ -247,7 +247,7 @@ public struct DispatchDataIterator : IteratorProtocol, Sequence {
/// - Precondition: No preceding call to `self.next()` has returned `nil`.
public mutating func next() -> DispatchData._Element? {
if _position == _count { return nil }
let element = _ptr[_position];
let element = _ptr[_position]
_position = _position + 1
return element
}
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/SDK/simd/simd.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ public func +=(lhs: inout ${mattype}, rhs: ${mattype}) -> Void {
}
public func -=(lhs: inout ${mattype}, rhs: ${mattype}) -> Void {
lhs = lhs - rhs;
lhs = lhs - rhs
}
/// Scalar-Matrix multiplication.
Expand Down

0 comments on commit bc09af3

Please sign in to comment.