mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +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:
@@ -41,12 +41,12 @@ std::string toMediaTypeString(GUID subtype);
|
||||
#define LOG(str) LogToFile(str, false);
|
||||
#endif
|
||||
|
||||
inline bool failed(HRESULT hr)
|
||||
constexpr inline bool failed(HRESULT hr)
|
||||
{
|
||||
return hr != S_OK;
|
||||
}
|
||||
|
||||
inline bool failed(bool val)
|
||||
constexpr inline bool failed(bool val)
|
||||
{
|
||||
return val == false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user