4 ms·
Hmm, I wonder why this was added: #if DEBUG currentKey = unchecked((int)0xdeadbeef); #endif https://github.com/dotnet/corefx/blob/
by NKCSS 12y ago
Hmm, I wonder why this was added:
#if DEBUG
currentKey = unchecked((int)0xdeadbeef);
#endif
https://github.com/dotnet/corefx/blob/master/src/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/HashRepartitionEnumerator.cs https://github.com/dotnet/corefx/blob/master/src/System.Linq... line 110 :P
- Demiurge 12y agolooks like a marker to see if the code got past two previous lines?
- gbvb 12y agoIt seems to be to avoid using currentKey inadvertently. If someone refers it elsewhere they get deadbeef.
- Someone 12y agoIt is a magic marker http://en.wikipedia.org/wiki/Magic_number_%28programming%29#Magic_debug_values http://en.wikipedia.org/wiki/Magic_number_%28programming%29#.... Both its 16-bit parts have odd values, it is an illegal address (at least on the systems it was introduced for), and it is recognizable in hex dumps. That makes it a good value for uninitialized memory.