Merge pull request #43 from jangko/fix_hash_function

fix #42, bad RGBA8 hash proc
This commit is contained in:
andri lim 2020-05-01 16:19:19 +07:00 committed by GitHub
commit d7d413c837
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,7 @@ install:
build_script: build_script:
- cd C:\projects\%APPVEYOR_PROJECT_SLUG% - cd C:\projects\%APPVEYOR_PROJECT_SLUG%
#- nimble install -y > nul - nimble install -y > nul
test_script: test_script:
- nimble tests - nimble tests

View File

@ -1279,6 +1279,7 @@ proc hash*(c: RGBA8): Hash =
h = h !& ord(c.g) h = h !& ord(c.g)
h = h !& ord(c.b) h = h !& ord(c.b)
h = h !& ord(c.a) h = h !& ord(c.a)
result = !$(h)
proc RGBA8FromGrey8[T](p: var RGBA8, input: openArray[T], px: int, mode: PNGColorMode) = proc RGBA8FromGrey8[T](p: var RGBA8, input: openArray[T], px: int, mode: PNGColorMode) =
p.r = input[px] p.r = input[px]