mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1202317. Support PodEqual over fixed-length arrays. r=Waldo
This commit is contained in:
parent
94aec1bd5e
commit
038ddb54c8
@ -180,6 +180,17 @@ PodEqual(const T* one, const T* two, size_t len)
|
|||||||
return !memcmp(one, two, len * sizeof(T));
|
return !memcmp(one, two, len * sizeof(T));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Determine whether the |N| elements at |one| are memory-identical to the
|
||||||
|
* |N| elements at |two|.
|
||||||
|
*/
|
||||||
|
template <class T, size_t N>
|
||||||
|
static MOZ_ALWAYS_INLINE bool
|
||||||
|
PodEqual(const T (&one)[N], const T (&two)[N])
|
||||||
|
{
|
||||||
|
return PodEqual(one, two, N);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif /* mozilla_PodOperations_h */
|
#endif /* mozilla_PodOperations_h */
|
||||||
|
Loading…
Reference in New Issue
Block a user