sc/source/core/tool/interpr1.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 12ccfe8526d156b457538290f717440bce1b5deb Author: Pedro Giffuni <[email protected]> Date: Tue Apr 21 17:41:29 2015 +0000 Minor cleanups in the random generator code. Drop unused variables. Enhance slightly the naming of static variables. diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index da0c9a0..0a0d3ae 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -1561,9 +1561,9 @@ b32MWC(void) } // Congruential -#define CNG ( cng = 69069 * cng + 13579 ) +#define CNG ( ScCNG = 69069 * ScCNG + 13579 ) // Xorshift -#define XS ( xs ^= (xs << 13), xs ^= (xs >> 17), xs ^= (xs << 5) ) +#define XS ( ScXS ^= (ScXS << 13), ScXS ^= (ScXS >> 17), ScXS ^= (ScXS << 5) ) #define KISS (b32MWC() + CNG + XS) @@ -1573,11 +1573,11 @@ void ScInterpreter::ScRandom() static rtlRandomPool aPool = rtl_random_createPool(); static sal_Bool SqSeeded = sal_False; - static sal_uInt32 i, x, cng, xs = 362436069; + static sal_uInt32 ScCNG, ScXS = 362436069; // Seeding for the PRNG if (SqSeeded == sal_False) { - rtl_random_getBytes(aPool, &cng, sizeof(cng)); + rtl_random_getBytes(aPool, &ScCNG, sizeof(ScCNG)); rtl_random_getBytes(aPool, &nScRandomQ, sizeof(nScRandomQ[0]) * SCRANDOMQ_SIZE); SqSeeded = sal_True; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
