Skip to content

Commit

Permalink
Merge pull request #3 from fjfdeztoro/master
Browse files Browse the repository at this point in the history
Fix build for Swift 4.0.2
  • Loading branch information
lemire authored Nov 21, 2017
2 parents c8ef320 + 4b3d3eb commit 8d95895
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 5 deletions.
62 changes: 62 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

# Created by https://www.gitignore.io/api/swift

### Swift ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
.build/

# CocoaPods - Refactored to standalone file

# Carthage - Refactored to standalone file

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

# End of https://www.gitignore.io/api/swift
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// swift-tools-version:4.0
import PackageDescription

let package = Package(
name: "SwiftBitset",
swiftLanguageVersions: [4],
targets: [
Target(name: "Bitset", dependencies: [])
.target(name: "Bitset", dependencies: []),
.testTarget(name: "BitsetTests", dependencies: ["Bitset"])
]
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import PackageDescription
let package = Package(
name: "fun",
dependencies: [
.Package(url: "https://github.com/lemire/SwiftBitset.git", majorVersion: 0)
.package(url: "https://github.com/lemire/SwiftBitset.git", from: "0.3.0")
]
)
```
Expand Down
4 changes: 2 additions & 2 deletions Sources/Bitset/Bitset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ infix operator &^=;// andNot

private extension Int64 {
func toUInt64() -> UInt64 { return UInt64(bitPattern:self) }
func toInt() -> Int { return Int(truncatingBitPattern:self) }
func toInt() -> Int { return Int(truncatingIfNeeded:self) }
}

private extension UInt64 {
func toInt64() -> Int64 { return Int64(bitPattern:self) }
func toInt() -> Int { return Int(truncatingBitPattern:self) }
func toInt() -> Int { return Int(truncatingIfNeeded:self) }
}

// a class that can be used as an efficient set container for non-negative integers
Expand Down

0 comments on commit 8d95895

Please sign in to comment.