From bfa0269380ef66606c3e0491d2f47d6f0d543a37 Mon Sep 17 00:00:00 2001 From: Yossa Bourne Date: Sun, 8 Nov 2020 21:21:06 +0700 Subject: [PATCH 1/4] fix: Edit podspec and update SwiftPriorityQueue version --- ImagePalette.podspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ImagePalette.podspec b/ImagePalette.podspec index 049b87b..9bfb5e5 100644 --- a/ImagePalette.podspec +++ b/ImagePalette.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = "ImagePalette" s.version = "0.1.0" s.summary = "Swift/iOS port of Android’s Palette" - s.homepage = "https://github.com/shnhrrsn/ImagePalette" + s.homepage = "https://github.com/terminox/ImagePalette" s.license = "Apache License 2.0" s.author = "Shaun Harrison" @@ -10,11 +10,11 @@ Pod::Spec.new do |s| s.platform = :ios, "8.0" s.source = { - :git => "https://github.com/shnhrrsn/ImagePalette.git", + :git => "https://github.com/terminox/ImagePalette.git", :tag => s.version } s.source_files = "src/*.swift" s.requires_arc = true - s.dependency 'SwiftPriorityQueue', '~> 1.1.2' + s.dependency 'SwiftPriorityQueue', '~> 1.3.1' end From bf98fde617ccb0ca521e32e408ceb166527e3b67 Mon Sep 17 00:00:00 2001 From: Yossa Bourne Date: Sun, 8 Nov 2020 21:21:50 +0700 Subject: [PATCH 2/4] fix(PaletteSwatch): Change access control from open to public --- src/PaletteSwatch.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PaletteSwatch.swift b/src/PaletteSwatch.swift index b0125b7..42c714d 100644 --- a/src/PaletteSwatch.swift +++ b/src/PaletteSwatch.swift @@ -18,10 +18,10 @@ open class PaletteSwatch { private let hex: Int64 /** This swatch’s color */ - open let color: UIColor + public let color: UIColor /** The number of pixels represented by this swatch */ - open let population: Int64 + public let population: Int64 private var generatedTextColors: Bool = false private var _titleTextColor: UIColor? From 7f99f8e0b59680704c6d6c8ac3dd2a7a18438608 Mon Sep 17 00:00:00 2001 From: Yossa Bourne Date: Mon, 9 Nov 2020 10:10:27 +0700 Subject: [PATCH 3/4] fix: Update podspec --- ImagePalette.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ImagePalette.podspec b/ImagePalette.podspec index 9bfb5e5..15dea38 100644 --- a/ImagePalette.podspec +++ b/ImagePalette.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = "ImagePalette" s.version = "0.1.0" s.summary = "Swift/iOS port of Android’s Palette" - s.homepage = "https://github.com/terminox/ImagePalette" + s.homepage = "https://github.com/shnhrrsn/ImagePalette" s.license = "Apache License 2.0" s.author = "Shaun Harrison" @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.platform = :ios, "8.0" s.source = { - :git => "https://github.com/terminox/ImagePalette.git", + :git => "https://github.com/shnhrrsn/ImagePalette.git", :tag => s.version } s.source_files = "src/*.swift" From cd5d0cacf90266a1e50057ae53dac9c33e31fa66 Mon Sep 17 00:00:00 2001 From: Yossa Bourne Date: Sat, 28 Nov 2020 00:07:42 +0700 Subject: [PATCH 4/4] fix(RGBColor): Fix complex expression error when compile for simulators --- src/RGBColor.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/RGBColor.swift b/src/RGBColor.swift index 4b46a11..25d35c7 100644 --- a/src/RGBColor.swift +++ b/src/RGBColor.swift @@ -21,8 +21,9 @@ internal struct RGBColor: Hashable, Equatable { self.green = green self.blue = blue self.alpha = alpha - let maxInt = Int64(Int32.max) - self.hashValue = Int(((alpha << 24) | (red << 16) | (green << 8) | blue) % maxInt) + let maxInt = Int64(Int32.max) + let base = ((alpha << 24) | (red << 16) | (green << 8) | blue) + self.hashValue = Int(base % maxInt) } init(color: UIColor) {