-
Please explain why Bochs code uses both I'm asking because I was surprised to see |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I didn't know classic C++ assert can be disabled for speed. |
Beta Was this translation helpful? Give feedback.
-
This is what Bochs/bochs/build/win32/vs2019-workspace/vs2019/bochs.vcxproj Lines 140 to 142 in 5147c20 (I disabled NDEBUG for this screenshot)
Can the same logic be applied to |
Beta Was this translation helpful? Give feedback.
-
This NDEBUG is not present in gcc and I even don't use MSVCPP. I coded it with the state of mind like this: |
Beta Was this translation helpful? Give feedback.
-
Ok, I made PR with this change: #158 |
Beta Was this translation helpful? Give feedback.
This NDEBUG is not present in gcc and I even don't use MSVCPP.
So I think you can get rid of NDEBUG if you want :)
I coded it with the state of mind like this:
Some asserts are really critical and must be done always and never disabled. These are classic assert().
Others affect performance too much or not interesting outside of new code development -> these are BX_ASSERT