From b0a54518d89cfad8fdc7a85576f72894bb40c950 Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Sat, 29 Jan 2022 10:40:19 -0700 Subject: [PATCH] Everywhere: Remove redundant inline keyword `constexpr` implies `inline` so when both are used it is redundant. --- AK/MemMem.h | 4 ++-- Kernel/Arch/aarch64/Registers.h | 5 +++-- Kernel/Memory/Region.h | 5 +++-- Userland/Libraries/LibSoftGPU/ImageFormat.h | 3 ++- Userland/Services/RequestServer/ConnectionCache.h | 5 +++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/AK/MemMem.h b/AK/MemMem.h index 25a2e455b09..ee49e116e71 100644 --- a/AK/MemMem.h +++ b/AK/MemMem.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, the SerenityOS developers. + * Copyright (c) 2020-2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -15,7 +15,7 @@ namespace AK { namespace Detail { -inline constexpr const void* bitap_bitwise(const void* haystack, size_t haystack_length, const void* needle, size_t needle_length) +constexpr const void* bitap_bitwise(const void* haystack, size_t haystack_length, const void* needle, size_t needle_length) { VERIFY(needle_length < 32); diff --git a/Kernel/Arch/aarch64/Registers.h b/Kernel/Arch/aarch64/Registers.h index 0319c62c061..891da0f5a37 100644 --- a/Kernel/Arch/aarch64/Registers.h +++ b/Kernel/Arch/aarch64/Registers.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2021, James Mintram * Copyright (c) 2021, Marcin Undak + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -145,7 +146,7 @@ struct TCR_EL1 { return tcr_el1; } - static inline constexpr TCR_EL1 reset_value() + static constexpr TCR_EL1 reset_value() { return {}; } @@ -220,7 +221,7 @@ struct SCTLR_EL1 { return sctlr; } - static inline constexpr SCTLR_EL1 reset_value() + static constexpr SCTLR_EL1 reset_value() { SCTLR_EL1 system_control_register_el1 = {}; system_control_register_el1.LSMAOE = 1; diff --git a/Kernel/Memory/Region.h b/Kernel/Memory/Region.h index 7dc83a78cbe..e977eecc8ba 100644 --- a/Kernel/Memory/Region.h +++ b/Kernel/Memory/Region.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2018-2022, Andreas Kling + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -234,7 +235,7 @@ public: AK_ENUM_BITWISE_OPERATORS(Region::Access) -inline constexpr Region::Access prot_to_region_access_flags(int prot) +constexpr Region::Access prot_to_region_access_flags(int prot) { Region::Access access = Region::Access::None; if ((prot & PROT_READ) == PROT_READ) @@ -246,7 +247,7 @@ inline constexpr Region::Access prot_to_region_access_flags(int prot) return access; } -inline constexpr int region_access_flags_to_prot(Region::Access access) +constexpr int region_access_flags_to_prot(Region::Access access) { int prot = 0; if ((access & Region::Access::Read) == Region::Access::Read) diff --git a/Userland/Libraries/LibSoftGPU/ImageFormat.h b/Userland/Libraries/LibSoftGPU/ImageFormat.h index 797f617ab7e..56c88eae497 100644 --- a/Userland/Libraries/LibSoftGPU/ImageFormat.h +++ b/Userland/Libraries/LibSoftGPU/ImageFormat.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Stephan Unverwerth + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -20,7 +21,7 @@ enum class ImageFormat { L8A8, }; -inline static constexpr size_t element_size(ImageFormat format) +static constexpr size_t element_size(ImageFormat format) { switch (format) { case ImageFormat::L8: diff --git a/Userland/Services/RequestServer/ConnectionCache.h b/Userland/Services/RequestServer/ConnectionCache.h index 5a91714ffb7..aa1079b0517 100644 --- a/Userland/Services/RequestServer/ConnectionCache.h +++ b/Userland/Services/RequestServer/ConnectionCache.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Ali Mohammad Pur + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -65,8 +66,8 @@ extern HashMap void recreate_socket_if_needed(T& connection, URL const& url)