mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 827234 - Move Swap to js/public/Utility from js/src/jsutil.h. r=terrence
This commit is contained in:
parent
bc2b60094e
commit
1be8d05c35
@ -709,6 +709,15 @@ class ReentrancyGuard
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
JS_ALWAYS_INLINE static void
|
||||
Swap(T &t, T &u)
|
||||
{
|
||||
T tmp(Move(t));
|
||||
t = Move(u);
|
||||
u = Move(tmp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Round x up to the nearest power of 2. This function assumes that the most
|
||||
* significant bit of x is not set, which would lead to overflow.
|
||||
|
@ -257,15 +257,6 @@ PodEqual(T *one, T *two, size_t len)
|
||||
return !memcmp(one, two, len * sizeof(T));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
JS_ALWAYS_INLINE static void
|
||||
Swap(T &t, T &u)
|
||||
{
|
||||
T tmp(Move(t));
|
||||
t = Move(u);
|
||||
u = Move(tmp);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline bool
|
||||
IsPowerOfTwo(T t)
|
||||
|
Loading…
Reference in New Issue
Block a user