#if defined(_DEBUG) → #if !defined(NDEBUG)
Microsoft declares all identifiers starting with underscore _ as internal to MSVC. Thus, we should either use defined(DEBUG) or !defined(NDEBUG) to distinguish Debug and Release builds. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
ce1688964a
commit
b6be4f040e
@ -1440,7 +1440,7 @@ namespace stdex
|
|||||||
{ "wbr", element_t::wbr, },
|
{ "wbr", element_t::wbr, },
|
||||||
{ "xmp", element_t::xmp, },
|
{ "xmp", element_t::xmp, },
|
||||||
};
|
};
|
||||||
#ifdef _DEBUG
|
#ifndef NDEBUG
|
||||||
// The mapping table MUST be sorted and all names in lowercase.
|
// The mapping table MUST be sorted and all names in lowercase.
|
||||||
for (size_t i = 1; i < _countof(mapping); i++)
|
for (size_t i = 1; i < _countof(mapping); i++)
|
||||||
_Assume_(stdex::strcmp(mapping[i - 1].name, mapping[i].name) <= 0);
|
_Assume_(stdex::strcmp(mapping[i - 1].name, mapping[i].name) <= 0);
|
||||||
|
@ -55,7 +55,7 @@ namespace stdex
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
const std::lock_guard<std::mutex> lg(m_mutex);
|
const std::lock_guard<std::mutex> lg(m_mutex);
|
||||||
#ifdef _DEBUG
|
#ifndef NDEBUG
|
||||||
size_t tail = wrap(m_head + m_size);
|
size_t tail = wrap(m_head + m_size);
|
||||||
_Assume_(size <= (m_head <= tail ? N_cap - tail : m_head - tail));
|
_Assume_(size <= (m_head <= tail ? N_cap - tail : m_head - tail));
|
||||||
#endif
|
#endif
|
||||||
@ -90,7 +90,7 @@ namespace stdex
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
const std::lock_guard<std::mutex> lg(m_mutex);
|
const std::lock_guard<std::mutex> lg(m_mutex);
|
||||||
#ifdef _DEBUG
|
#ifndef NDEBUG
|
||||||
size_t tail = wrap(m_head + m_size);
|
size_t tail = wrap(m_head + m_size);
|
||||||
_Assume_(size <= (m_head < tail ? m_size : N_cap - m_head));
|
_Assume_(size <= (m_head < tail ? m_size : N_cap - m_head));
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user