mirror of
https://github.com/matrix-construct/construct
synced 2024-05-19 19:33:45 +02:00
Replace various #if 0 with if constexpr for regression visibility.
This commit is contained in:
parent
90f1dc77fb
commit
fd6f06c1af
10
ircd/exec.cc
10
ircd/exec.cc
|
@ -332,7 +332,8 @@ void
|
|||
ircd::exec::handler::on_exec_setup(executor &ex)
|
||||
const noexcept
|
||||
{
|
||||
#if 0 // outputs from child; don't want
|
||||
if constexpr((false)) // outputs from child; don't want
|
||||
{
|
||||
assert(e);
|
||||
|
||||
log::logf
|
||||
|
@ -343,7 +344,7 @@ const noexcept
|
|||
e->pid,
|
||||
e->path,
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
// Set the parent death signal in case of a crash so we won't go zombie.
|
||||
#if defined(HAVE_SYS_PRCTL_H)
|
||||
|
@ -462,7 +463,8 @@ ircd::exec::handler::on_exec_error(executor &ex,
|
|||
const std::error_code &ec)
|
||||
const noexcept
|
||||
{
|
||||
#if 0 // outputs from child; don't want
|
||||
if constexpr((false)) // outputs from child; don't want
|
||||
{
|
||||
assert(e);
|
||||
|
||||
char ecbuf[64];
|
||||
|
@ -475,7 +477,7 @@ const noexcept
|
|||
ec.value(),
|
||||
string(ecbuf, ec),
|
||||
};
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
template<class executor>
|
||||
|
|
|
@ -2273,7 +2273,8 @@ ircd::server::link::submit(request &request)
|
|||
request.tag? queue.emplace(end(queue), std::move(*request.tag)):
|
||||
queue.emplace(end(queue), request)
|
||||
};
|
||||
/*
|
||||
|
||||
if constexpr((false))
|
||||
log::debug
|
||||
{
|
||||
log, "tag(%p) submitted to link(%p) queue: %zu",
|
||||
|
@ -2281,7 +2282,7 @@ ircd::server::link::submit(request &request)
|
|||
this,
|
||||
tag_count()
|
||||
};
|
||||
*/
|
||||
|
||||
if(ready())
|
||||
wait_writable();
|
||||
}
|
||||
|
@ -2347,14 +2348,13 @@ ircd::server::link::cleanup_canceled()
|
|||
continue;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if constexpr((false))
|
||||
log::dwarning
|
||||
{
|
||||
log, "%s removing abandoned tag:%lu",
|
||||
loghead(*this),
|
||||
tag.state.id,
|
||||
};
|
||||
#endif
|
||||
|
||||
it = queue.erase(it);
|
||||
}
|
||||
|
|
|
@ -47,14 +47,13 @@ catch(const ctx::interrupted &)
|
|||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
#if 0
|
||||
if constexpr((false))
|
||||
log::derror
|
||||
{
|
||||
log, "sysfs query `%s' :%s",
|
||||
relpath,
|
||||
e.what(),
|
||||
};
|
||||
#endif
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -754,7 +754,7 @@ ircd::m::fetch::finish(request &request)
|
|||
{
|
||||
request.finished = ircd::now<system_point>();
|
||||
|
||||
#if 0
|
||||
if constexpr((false))
|
||||
log::logf
|
||||
{
|
||||
log, request.eptr? log::DERROR: log::DEBUG,
|
||||
|
@ -768,7 +768,6 @@ ircd::m::fetch::finish(request &request)
|
|||
request.eptr? " :" : "",
|
||||
what(request.eptr),
|
||||
};
|
||||
#endif
|
||||
|
||||
if(!request.promise)
|
||||
return;
|
||||
|
|
|
@ -1397,14 +1397,13 @@ ircd::m::vm::call_hook(hook::site<T> &hook,
|
|||
T&& data)
|
||||
try
|
||||
{
|
||||
#if 0
|
||||
if constexpr((false))
|
||||
log::debug
|
||||
{
|
||||
log, "%s hook:%s enter",
|
||||
loghead(eval),
|
||||
hook.name(),
|
||||
};
|
||||
#endif
|
||||
|
||||
// Providing a pointer to the eval.hook pointer allows the hook site to
|
||||
// provide updates for observers in other contexts for which hook is
|
||||
|
@ -1416,14 +1415,13 @@ try
|
|||
|
||||
hook(cur, event, std::forward<T>(data));
|
||||
|
||||
#if 0
|
||||
if constexpr((false))
|
||||
log::debug
|
||||
{
|
||||
log, "%s hook:%s leave",
|
||||
loghead(eval),
|
||||
hook.name(),
|
||||
};
|
||||
#endif
|
||||
}
|
||||
catch(const m::error &e)
|
||||
{
|
||||
|
|
|
@ -148,7 +148,7 @@ try
|
|||
event, rule, opts
|
||||
};
|
||||
|
||||
#if 0
|
||||
if constexpr((false))
|
||||
log::debug
|
||||
{
|
||||
log, "event %s rule { %s, %s, %s } for %s %s",
|
||||
|
@ -159,7 +159,6 @@ try
|
|||
string_view{user_id},
|
||||
bool(match)? "MATCH"_sv : string_view{}
|
||||
};
|
||||
#endif
|
||||
|
||||
return bool(match);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue