Hal Canary | 9a3f554 | 2018-12-10 19:59:07 -0500 | [diff] [blame] | 1 | // Copyright 2018 Google LLC. |
| 2 | // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| 3 | #ifndef SkUUID_DEFINED |
| 4 | #define SkUUID_DEFINED |
| 5 | |
| 6 | #include <cstdint> |
| 7 | #include <cstring> |
| 8 | |
| 9 | struct SkUUID { |
| 10 | uint8_t fData[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; |
| 11 | }; |
| 12 | |
| 13 | static inline bool operator==(const SkUUID& u, const SkUUID& v) { |
| 14 | return 0 == memcmp(u.fData, v.fData, sizeof(u.fData)); |
| 15 | } |
| 16 | static inline bool operator!=(const SkUUID& u, const SkUUID& v) { return !(u == v); } |
| 17 | |
| 18 | #endif // SkUUID_DEFINED |