mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1202317. Support PodEqual over fixed-length arrays. r=Waldo
--HG-- extra : commitid : CojJ669FPWd extra : rebase_source : fd81c9367dcb9dacf9e5ba137fe9a4ef31a5853e
This commit is contained in:
parent
ff15b1bada
commit
5d455e0375
@ -180,6 +180,17 @@ PodEqual(const T* one, const T* two, size_t len)
|
||||
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
|
||||
|
||||
#endif /* mozilla_PodOperations_h */
|
||||
|
Loading…
Reference in New Issue
Block a user