mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:27:34 +00:00
Kernel: Use operator ""sv
in all class_name() implementations
Previously there was a mix of returning plain strings and returning explicit string views using `operator ""sv`. This change switches them all to standardized on `operator ""sv` as it avoids a call to strlen.
This commit is contained in:
parent
836c22ea13
commit
5f1c98e576
39 changed files with 39 additions and 39 deletions
|
@ -73,7 +73,7 @@ public:
|
|||
|
||||
protected:
|
||||
IPv4Socket(int type, int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer, OwnPtr<KBuffer> optional_scratch_buffer);
|
||||
virtual StringView class_name() const override { return "IPv4Socket"; }
|
||||
virtual StringView class_name() const override { return "IPv4Socket"sv; }
|
||||
|
||||
PortAllocationResult allocate_local_port_if_needed();
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
|
||||
private:
|
||||
explicit LocalSocket(int type, NonnullOwnPtr<DoubleBuffer> client_buffer, NonnullOwnPtr<DoubleBuffer> server_buffer);
|
||||
virtual StringView class_name() const override { return "LocalSocket"; }
|
||||
virtual StringView class_name() const override { return "LocalSocket"sv; }
|
||||
virtual bool is_local() const override { return true; }
|
||||
bool has_attached_peer(const OpenFileDescription&) const;
|
||||
DoubleBuffer* receive_buffer_for(OpenFileDescription&);
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
virtual ~LoopbackAdapter() override;
|
||||
|
||||
virtual void send_raw(ReadonlyBytes) override;
|
||||
virtual StringView class_name() const override { return "LoopbackAdapter"; }
|
||||
virtual StringView class_name() const override { return "LoopbackAdapter"sv; }
|
||||
virtual bool link_up() override { return true; }
|
||||
virtual bool link_full_duplex() override { return true; }
|
||||
virtual int link_speed() override { return 1000; }
|
||||
|
|
|
@ -123,7 +123,7 @@ protected:
|
|||
size_t backlog() const { return m_backlog; }
|
||||
void set_backlog(size_t backlog) { m_backlog = backlog; }
|
||||
|
||||
virtual StringView class_name() const override { return "Socket"; }
|
||||
virtual StringView class_name() const override { return "Socket"sv; }
|
||||
|
||||
virtual void shut_down_for_reading() { }
|
||||
virtual void shut_down_for_writing() { }
|
||||
|
|
|
@ -166,7 +166,7 @@ protected:
|
|||
|
||||
private:
|
||||
explicit TCPSocket(int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer, NonnullOwnPtr<KBuffer> scratch_buffer);
|
||||
virtual StringView class_name() const override { return "TCPSocket"; }
|
||||
virtual StringView class_name() const override { return "TCPSocket"sv; }
|
||||
|
||||
virtual void shut_down_for_writing() override;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
private:
|
||||
explicit UDPSocket(int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer);
|
||||
virtual StringView class_name() const override { return "UDPSocket"; }
|
||||
virtual StringView class_name() const override { return "UDPSocket"sv; }
|
||||
static MutexProtected<HashMap<u16, UDPSocket*>>& sockets_by_port();
|
||||
|
||||
virtual KResultOr<size_t> protocol_receive(ReadonlyBytes raw_ipv4_packet, UserOrKernelBuffer& buffer, size_t buffer_size, int flags) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue