Skip to content
Snippets Groups Projects
Commit 058f6720 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Ignore clang-tidy issues due to release-build

parent 62922234
No related branches found
No related tags found
No related merge requests found
...@@ -144,6 +144,9 @@ class ALIGN_TO_CACHE_LINE Context : Logger<LogSubsystem::C> { ...@@ -144,6 +144,9 @@ class ALIGN_TO_CACHE_LINE Context : Logger<LogSubsystem::C> {
* that this method is usually called by a so called "unblock * that this method is usually called by a so called "unblock
* Fiber". This method does not return. * Fiber". This method does not return.
*/ */
// The discardAndResume() method could theoretically be made static in
// non-debug builds.
// NOLINTNEXTLINE(readability-convert-member-functions-to-static)
[[noreturn]] inline void discardAndResume(Context* context) { [[noreturn]] inline void discardAndResume(Context* context) {
// assert(context != nullptr); // assert(context != nullptr);
......
...@@ -58,14 +58,24 @@ void ContextManager::saveAndStartNew(func_t freshContextHook) { ...@@ -58,14 +58,24 @@ void ContextManager::saveAndStartNew(func_t freshContextHook) {
Context::getCurrentContext()->saveAndStart(freeContext); Context::getCurrentContext()->saveAndStart(freeContext);
} }
#ifdef NDEBUG
#define HOOK_CAPTURE_LIST contextToFree
#else
// We only need to caputure 'this' for the LOGD() debug macro.
#define HOOK_CAPTURE_LIST this, contextToFree
#endif
/** /**
* Discard the current context and resume a saved one. * Discard the current context and resume a saved one.
*/ */
// The discardAndResume() method could theoretically be made static in
// non-debug builds.
// NOLINTNEXTLINE(readability-convert-member-functions-to-static)
void ContextManager::discardAndResume(Context* context) { void ContextManager::discardAndResume(Context* context) {
assert(context != nullptr); assert(context != nullptr);
Context* contextToFree = Context::getCurrentContext(); Context* contextToFree = Context::getCurrentContext();
context->setHook([this, contextToFree] { context->setHook([HOOK_CAPTURE_LIST] {
LOGD("Freeing context " << contextToFree); LOGD("Freeing context " << contextToFree);
putFreeContext(contextToFree); putFreeContext(contextToFree);
}); });
......
...@@ -23,6 +23,9 @@ class Dispatcher : public Logger<LogSubsystem::DISP> { ...@@ -23,6 +23,9 @@ class Dispatcher : public Logger<LogSubsystem::DISP> {
auto getDispatchLoop() -> func_t; auto getDispatchLoop() -> func_t;
// The dispatch() method could theoretically be made static in
// non-debug builds.
// NOLINTNEXTLINE(readability-convert-member-functions-to-static)
inline void dispatch(const Fiber* fiber) { inline void dispatch(const Fiber* fiber) {
LOGD("executing fiber " << fiber); LOGD("executing fiber " << fiber);
currentFiber = fiber; currentFiber = fiber;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment