1
0

Use C++11 auto instead of per-platform types.

Closes #2686.
This commit is contained in:
Mattes D 2015-12-03 13:52:35 +01:00
parent 213419a4cc
commit 03a972ec55

View File

@ -14,13 +14,6 @@
#include <unistd.h>
#endif
// FreeBSD uses size_t for the return type of backtrace()
#if defined(__FreeBSD__) && (__FreeBSD__ >= 10)
#define btsize size_t
#else
#define btsize int
#endif
@ -44,7 +37,7 @@ void PrintStackTrace(void)
// Use the backtrace() function to get and output the stackTrace:
// Code adapted from http://stackoverflow.com/questions/77005/how-to-generate-a-stacktrace-when-my-gcc-c-app-crashes
void * stackTrace[30];
btsize numItems = backtrace(stackTrace, ARRAYCOUNT(stackTrace));
auto numItems = backtrace(stackTrace, ARRAYCOUNT(stackTrace));
backtrace_symbols_fd(stackTrace, numItems, STDERR_FILENO);
#endif
#endif