mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Everywhere: Make global inline
functions not static
`inline` already assigns vague linkage, so there's no need to also assign per-TU linkage. Allows the linker to dedup these functions across TUs (and is almost always just the Right Thing to do in C++ -- this ain't C).
This commit is contained in:
parent
0a3cc10bb6
commit
a96f307af1
Notes:
sideshowbarker
2024-07-17 07:25:39 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/a96f307af1 Pull-request: https://github.com/SerenityOS/serenity/pull/16819 Reviewed-by: https://github.com/linusg ✅
3 changed files with 3 additions and 3 deletions
|
@ -1012,7 +1012,7 @@ inline ProcessID Thread::pid() const
|
|||
#define VERIFY_NO_PROCESS_BIG_LOCK(process) \
|
||||
VERIFY(!process->big_lock().is_exclusively_locked_by_current_thread())
|
||||
|
||||
inline static ErrorOr<NonnullOwnPtr<KString>> try_copy_kstring_from_user(Kernel::Syscall::StringArgument const& string)
|
||||
inline ErrorOr<NonnullOwnPtr<KString>> try_copy_kstring_from_user(Kernel::Syscall::StringArgument const& string)
|
||||
{
|
||||
Userspace<char const*> characters((FlatPtr)string.characters);
|
||||
return try_copy_kstring_from_user(characters, string.length);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
namespace Gfx::Detail {
|
||||
|
||||
[[maybe_unused]] inline static void approximately_place_on_int_grid(FloatPoint ffrom, FloatPoint fto, IntPoint& from, IntPoint& to, Optional<IntPoint> previous_to)
|
||||
[[maybe_unused]] inline void approximately_place_on_int_grid(FloatPoint ffrom, FloatPoint fto, IntPoint& from, IntPoint& to, Optional<IntPoint> previous_to)
|
||||
{
|
||||
auto diffs = fto - ffrom;
|
||||
// Truncate all first (round down).
|
||||
|
|
|
@ -31,7 +31,7 @@ template<typename... Parameters>
|
|||
exit(1);
|
||||
}
|
||||
|
||||
inline static bool validate_timestamp(unsigned year, unsigned month, unsigned day, unsigned hour, unsigned minute, unsigned second)
|
||||
inline bool validate_timestamp(unsigned year, unsigned month, unsigned day, unsigned hour, unsigned minute, unsigned second)
|
||||
{
|
||||
return (year >= 1970) && (month >= 1 && month <= 12) && (day >= 1 && day <= static_cast<unsigned>(days_in_month(year, month))) && (hour <= 23) && (minute <= 59) && (second <= 59);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue