<table><tr><td style="">mpyne added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5966" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Would it be better to use <tt style="background: #ebebeb; font-size: 13px;">QThreadStorage<bool></tt> (to record if the thread has been seeded) instead of a <tt style="background: #ebebeb; font-size: 13px;">QSet</tt>?  It would allow us to more easily adopt C++11's <tt style="background: #ebebeb; font-size: 13px;">thread_local</tt> once we remove support for older compilers.  I also looked into whether we could adopt the higher-quality RNGs that should be available in C++11, but getting them seeded is apparently very difficult to do without introducing errors.</p>

<p>Also, I'd recommend using <tt style="background: #ebebeb; font-size: 13px;">quintptr</tt> instead of <tt style="background: #ebebeb; font-size: 13px;">intptr_t</tt> in the reinterpret_cast, as that seems more accurate for the semantics of XOR.  The shift to XOR is a great idea though.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5966" rel="noreferrer">https://phabricator.kde.org/D5966</a></div></div><br /><div><strong>To: </strong>tfry, dfaure<br /><strong>Cc: </strong>mpyne, tfry, rjvbb, Frameworks<br /></div>