move RDCBREAK() OS-implementation from inline function to macro

* It's a little messier as it's easier for the os-specific header to not
  define it and get confusing errors, but that's a one-time problem and
  having an extra function in a callstack and not showing source at the
  point of the RDCBREAK is annoying every time.
This commit is contained in:
Baldur Karlsson
2014-07-28 12:17:34 +01:00
parent cda21724f5
commit a728f3289b
3 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ bool FindDiffRange(void *a, void *b, size_t bufSize, size_t &diffStart, size_t &
#define RDCDUMP() do { OSUtility::ForceCrash(); } while(0)
#if !defined(RELEASE) || defined(FORCE_DEBUGBREAK)
#define RDCBREAK() do { if(OSUtility::DebuggerPresent()) OSUtility::DebugBreak(); else RDCDUMP(); } while(0)
#define RDCBREAK() do { if(OSUtility::DebuggerPresent()) OS_DEBUG_BREAK(); else RDCDUMP(); } while(0)
#else
#define RDCBREAK() do { } while(0)
#endif
+2
View File
@@ -32,6 +32,8 @@
#define __PRETTY_FUNCTION_SIGNATURE__ __PRETTY_FUNCTION__
#define OS_DEBUG_BREAK() raise(SIGTRAP)
#define GetEmbeddedResource(filename) string( CONCAT(CONCAT(_binary_, filename), _start) , CONCAT(CONCAT(_binary_, filename), _end) )
namespace OSUtility
+2
View File
@@ -30,6 +30,8 @@
#define __PRETTY_FUNCTION_SIGNATURE__ __FUNCSIG__
#define OS_DEBUG_BREAK() __debugbreak()
#define GetEmbeddedResource(filename) GetEmbeddedResourceWin32( CONCAT(RESOURCE_, filename) )
string GetEmbeddedResourceWin32(int resource);