Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: tests/GrBinHashKeyTest.cpp

Issue 746043002: Small changes to get things building and running on Linux/ARM. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/common_conditions.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GrBinHashKeyTest.cpp
diff --git a/tests/GrBinHashKeyTest.cpp b/tests/GrBinHashKeyTest.cpp
index 605fd9f29a429d2e5f94a37c4fce03af2a57a369..175719d3cd238d119d6306e356aedb2ea9361bd7 100644
--- a/tests/GrBinHashKeyTest.cpp
+++ b/tests/GrBinHashKeyTest.cpp
@@ -13,11 +13,17 @@
#include "Test.h"
+struct AlignedKey {
+ uint32_t align;
+ char key[8];
+};
+
template<typename KeyType> static void TestHash(skiatest::Reporter* reporter) {
- const char* testStringA_ = "abcdABCD";
- const char* testStringB_ = "abcdBBCD";
- const uint32_t* testStringA = reinterpret_cast<const uint32_t*>(testStringA_);
- const uint32_t* testStringB = reinterpret_cast<const uint32_t*>(testStringB_);
+ AlignedKey a, b;
+ memcpy(&a.key, "abcdABCD", 8);
+ memcpy(&b.key, "abcdBBCD", 8);
+ const uint32_t* testStringA = reinterpret_cast<const uint32_t*>(&a.key);
+ const uint32_t* testStringB = reinterpret_cast<const uint32_t*>(&b.key);
KeyType keyA;
keyA.setKeyData(testStringA);
« no previous file with comments | « gyp/common_conditions.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698