From 119a6883e6f795815744b9afd6a79084c619ddb6 Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Thu, 20 Jan 2022 23:47:57 -0300 Subject: Automatic limbs enum generation (#221) * proof of concept * SetLimbIndex * LIMB_DONE * use proper enum name in limbs * fix naming * add ifdefs * fix me being dumb * format * Add EnumPrefix * EnumName * Remove autogenerator stuff * Add warnings * format * Use HANDLE_WARNING_RESOURCE for warning * object_box special case * whoops * Remove overloaded bitconverter methods and use boundary-checker .at method when possible * Fix warning * Fix warning * format * Hopefully fix every warning now * docs * Review * typo * Update jenkinsfile for MM * format * Force functionpreamble printing in development mode * Use ARRAY_COUNT on SkeletonHeaders * Simplify endif in header guards * fix limbs using the wrong enum value * use hex in enum comments --- ZAPD/WarningHandler.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ZAPD/WarningHandler.cpp') diff --git a/ZAPD/WarningHandler.cpp b/ZAPD/WarningHandler.cpp index 29f8352..163b028 100644 --- a/ZAPD/WarningHandler.cpp +++ b/ZAPD/WarningHandler.cpp @@ -199,8 +199,16 @@ bool WarningHandler::WasElevatedToError(WarningType warnType) { * Print file/line/function info for debugging */ void WarningHandler::FunctionPreamble(const char* filename, int32_t line, const char* function) { - if (Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_DEBUG) { - fprintf(stderr, "%s:%i: in function %s:\n", filename, line, function); + bool forcePrint = false; + +#ifdef DEVELOPMENT + forcePrint = true; +#endif + + fprintf(stderr, "\n"); + + if (forcePrint || Globals::Instance->verbosity >= VerbosityLevel::VERBOSITY_DEBUG) { + fprintf(stderr, "%s:%i: in function <%s>:\n", filename, line, function); } } -- cgit v1.2.3