Skip to content
Snippets Groups Projects

Clean mapped

Merged Loic Hausammann requested to merge clean_mapped into master
20 files
+ 518
626
Compare changes
  • Side-by-side
  • Inline
Files
20
+ 18
0
@@ -53,6 +53,23 @@ INLINE static int GetDeltaTime(const high_resolution_clock::time_point init,
return span.count();
}
#ifdef CSDS_DEBUG_CHECKS
/**
* @brief Error macro. Prints the message given in argument and aborts.
*/
#define csds_error(input) \
{ \
float delta_time_error = GetDeltaTime(INITIAL_TIME); \
delta_time_error /= 1000; /* into seconds */ \
\
std::cout << std::flush; \
std::cerr << "[" << std::setfill('0') << std::setw(6) \
<< std::setprecision(1) << delta_time_error << "] " << __FILE__ \
<< ":" << __FUNCTION__ << ":" << __LINE__ << ": " << input \
<< std::endl; \
csds_abort(1); \
}
#else
/**
* @brief Error macro. Prints the message given in argument and aborts.
*/
@@ -71,6 +88,7 @@ INLINE static int GetDeltaTime(const high_resolution_clock::time_point init,
else \
throw std::runtime_error("See above for the description"); \
}
#endif
/**
* @brief Macro to print a localized message with variable arguments.
Loading