mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +00:00
Everywhere: Redundant inline specifier on constexpr functions (#3807)
Problem: - `constexpr` functions are decorated with the `inline` specifier keyword. This is redundant because `constexpr` functions are implicitly `inline`. - [dcl.constexpr], §7.1.5/2 in the C++11 standard): "constexpr functions and constexpr constructors are implicitly inline (7.1.2)". Solution: - Remove the redundant `inline` keyword.
This commit is contained in:
parent
a40abd6ce3
commit
d1fe6a0b53
13 changed files with 43 additions and 43 deletions
|
@ -205,7 +205,7 @@ enum Function {
|
|||
__Count
|
||||
};
|
||||
|
||||
inline constexpr const char* to_string(Function function)
|
||||
constexpr const char* to_string(Function function)
|
||||
{
|
||||
switch (function) {
|
||||
#undef __ENUMERATE_SYSCALL
|
||||
|
|
|
@ -499,7 +499,7 @@ struct [[gnu::aligned(16)]] FPUState
|
|||
u8 buffer[512];
|
||||
};
|
||||
|
||||
inline constexpr FlatPtr page_base_of(FlatPtr address)
|
||||
constexpr FlatPtr page_base_of(FlatPtr address)
|
||||
{
|
||||
return address & PAGE_MASK;
|
||||
}
|
||||
|
@ -509,7 +509,7 @@ inline FlatPtr page_base_of(const void* address)
|
|||
return page_base_of((FlatPtr)address);
|
||||
}
|
||||
|
||||
inline constexpr FlatPtr offset_in_page(FlatPtr address)
|
||||
constexpr FlatPtr offset_in_page(FlatPtr address)
|
||||
{
|
||||
return address & (~PAGE_MASK);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace Kernel {
|
|||
|
||||
class Process;
|
||||
|
||||
inline constexpr u32 encoded_device(unsigned major, unsigned minor)
|
||||
constexpr u32 encoded_device(unsigned major, unsigned minor)
|
||||
{
|
||||
return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue