Commit d8bd1ecf authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Switch from NDEBUG to kIsDebug in MPMCQueue

Summary: [Folly] Switch from `NDEBUG` to `kIsDebug` in `MPMCQueue`, preferring C++ over the preprocessor.

Reviewed By: Orvid

Differential Revision: D15303518

fbshipit-source-id: d014cea3035527bd27854f58b1a74a48740efd20
parent 585e9bc7
......@@ -1455,9 +1455,9 @@ struct SingleElementQueue {
} catch (...) {
// g++ doesn't seem to have std::is_nothrow_destructible yet
}
#ifndef NDEBUG
memset(&contents_, 'Q', sizeof(T));
#endif
if (kIsDebug) {
memset(&contents_, 'Q', sizeof(T));
}
}
/// Tag classes for dispatching to enqueue/dequeue implementation.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment