mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 02:10:21 +08:00
chore: tweak on posix logging
e.g. `void foo(std::function<void(void)>)`
This commit is contained in:
@@ -531,7 +531,8 @@ namespace asst
|
||||
#ifndef _MSC_VER
|
||||
inline constexpr std::string_view summarize_pretty_function(std::string_view pf) // can be consteval?
|
||||
{
|
||||
const auto paren = pf.find_last_of('(');
|
||||
// unable to handle something like std::function<void(void)> gen_func()
|
||||
const auto paren = pf.find_first_of('(');
|
||||
if (paren != std::string_view::npos) pf.remove_suffix(pf.size() - paren);
|
||||
const auto space = pf.find_last_of(' ');
|
||||
if (space != std::string_view::npos) pf.remove_prefix(space + 1);
|
||||
|
||||
Reference in New Issue
Block a user