Ignore:
Timestamp:
Jun 10, 2010, 1:49:45 AM (15 years ago)
Author:
[email protected]
Message:

2010-06-10 Kwang Yul Seo <[email protected]>

Reviewed by Eric Seidel.

Remove weakRandomNumber
https://bugs.webkit.org/show_bug.cgi?id=40291

weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.

  • wtf/RandomNumber.cpp:
  • wtf/RandomNumber.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/RandomNumber.cpp

    r53928 r60945  
    4848
    4949namespace WTF {
    50 
    51 double weakRandomNumber()
    52 {
    53 #if COMPILER(MSVC) && defined(_CRT_RAND_S)
    54     // rand_s is incredibly slow on windows so we fall back on rand for Math.random
    55     return (rand() + (rand() / (RAND_MAX + 1.0))) / (RAND_MAX + 1.0);
    56 #elif PLATFORM(BREWMP)
    57     uint32_t bits;
    58     GETRAND(reinterpret_cast<byte*>(&bits), sizeof(uint32_t));
    59     return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0);
    60 #else
    61     return randomNumber();
    62 #endif
    63 }
    6450
    6551double randomNumber()
Note: See TracChangeset for help on using the changeset viewer.