Fix Alignment of Hashed Structs (#287)

* Fix alignment of ASImageNodeContentsKey struct to fix hashing

* Change the change log by logging a change

* Add the world's stupidest explicit cast

* Actually its simpler
This commit is contained in:
Adlai Holler
2017-05-17 18:08:50 -07:00
committed by GitHub
parent 8c45eaefce
commit d30c35787c
5 changed files with 16 additions and 2 deletions

View File

@@ -24,6 +24,8 @@ NSString *const ASTextKitEntityAttributeName = @"ck_entity";
size_t ASTextKitAttributes::hash() const
{
#pragma clang diagnostic push
#pragma clang diagnostic warning "-Wpadded"
struct {
NSUInteger attrStringHash;
NSUInteger truncationStringHash;
@@ -35,6 +37,7 @@ size_t ASTextKitAttributes::hash() const
NSUInteger shadowColorHash;
CGFloat shadowOpacity;
CGFloat shadowRadius;
#pragma clang diagnostic pop
} data = {
[attributedString hash],
[truncationAttributedString hash],