Bug 1290337 - Part 12: Use const reference in PodSet. r=sfink
authorTooru Fujisawa <arai_a@mac.com>
Sun, 11 Sep 2016 18:15:23 +0900
changeset 316057 b8795d891dba1086abc141de2a248d386f009085
parent 316056 9550e82a1bc0fdc7274998a7a97a591268ad32bd
child 316058 3fb25baa6f83cc05b2e44c896d4bb922904ac0c3
push id30759
push userphilringnalda@gmail.com
push dateSat, 01 Oct 2016 06:25:09 +0000
treeherdermozilla-central@fcc62bbf09ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1290337
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1290337 - Part 12: Use const reference in PodSet. r=sfink
js/src/jsutil.h
--- a/js/src/jsutil.h
+++ b/js/src/jsutil.h
@@ -301,17 +301,17 @@ ClearAllBitArrayElements(size_t* array, 
 
 namespace mozilla {
 
 /**
  * Set the first |aNElem| T elements in |aDst| to |aSrc|.
  */
 template<typename T>
 static MOZ_ALWAYS_INLINE void
-PodSet(T* aDst, T aSrc, size_t aNElem)
+PodSet(T* aDst, const T& aSrc, size_t aNElem)
 {
     for (const T* dstend = aDst + aNElem; aDst < dstend; ++aDst)
         *aDst = aSrc;
 }
 
 } /* namespace mozilla */
 
 /*