浏览代码

TCP: Remove unnecessarily defined constructor and destructor

Problem: Defining the destructor violates the "rule of 0" and prevents
the copy/move constructor/assignment operators from being provided by
the compiler.

Solution: Change the constructor and destructor to be the default
compiler-provided definition.
Lenny Maiorani 4 年之前
父节点
当前提交
44d4423229
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Kernel/Net/TCP.h

+ 2 - 2
Kernel/Net/TCP.h

@@ -44,8 +44,8 @@ struct TCPFlags {
 class [[gnu::packed]] TCPPacket
 {
 public:
-    TCPPacket() { }
-    ~TCPPacket() { }
+    TCPPacket() = default;
+    ~TCPPacket() = default;
 
     size_t header_size() const { return data_offset() * sizeof(u32); }