mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
[Analyzers][CPP] Turn on rule 26497 (#23119)
* Turn on warning 26497 This function function-name could be marked constexpr if compile-time evaluation is desired. * C++20 has constexpr swap * as constexpr is not only for compile time, make all functions that can be constexpr constexpr * constexpr functions are implicity inline
This commit is contained in:
@@ -207,7 +207,7 @@ namespace MonitorUtils
|
||||
return { .id = str.substr(0, dividerPos), .instanceId = str.substr(dividerPos + 1) };
|
||||
}
|
||||
|
||||
inline bool not_digit(wchar_t ch)
|
||||
constexpr inline bool not_digit(wchar_t ch)
|
||||
{
|
||||
return '0' <= ch && ch <= '9';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user