diff --git a/js/public/Utility.h b/js/public/Utility.h index 0bfb58a6246..e57bd7f6fc6 100644 --- a/js/public/Utility.h +++ b/js/public/Utility.h @@ -709,6 +709,15 @@ class ReentrancyGuard } }; +template +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. diff --git a/js/src/jsutil.h b/js/src/jsutil.h index 7285de08f6f..3cbd306cb84 100644 --- a/js/src/jsutil.h +++ b/js/src/jsutil.h @@ -257,15 +257,6 @@ PodEqual(T *one, T *two, size_t len) return !memcmp(one, two, len * sizeof(T)); } -template -JS_ALWAYS_INLINE static void -Swap(T &t, T &u) -{ - T tmp(Move(t)); - t = Move(u); - u = Move(tmp); -} - template static inline bool IsPowerOfTwo(T t)