Created
August 18, 2022 18:42
-
-
Save temurka1/19e0959b260b039e7c37895dbea96f70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Usage: | |
| #define ENABLE_TRACE | |
| #include "trace.h" | |
| TRACE("\n\tx = " << vrt.X() << " y = " << vrt.Y() << " z = " << vrt.Z()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef ENABLE_TRACE | |
| #ifdef _MSC_VER | |
| #include <windows.h> | |
| #include <sstream> | |
| #define TRACE(x) do { std::stringstream s; s << x; OutputDebugStringA((LPCSTR)(s.str().c_str())); } while(0) | |
| #else | |
| #include <iostream> | |
| #define TRACE(x) std::clog << (x) | |
| #endif | |
| #else | |
| # define TRACE(x) | |
| #endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment