Fix: file-descriptor: unnecessary assert in move constructor
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Mar 2023 17:41:26 +0000 (13:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 11 Apr 2023 20:26:58 +0000 (16:26 -0400)
There is no use in checking the current fd in the move constructor. This
is probably a left-over from the inital move assignment operator.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I416d2778784ddea448904118c940914c030bf399

src/common/file-descriptor.hpp

index 51f397bcfd3c2df822b81febf26734b5bce81d31..8d6b64be4f51772fbb50692ca0577330294c7c2f 100644 (file)
@@ -29,8 +29,8 @@ public:
        file_descriptor& operator=(const file_descriptor&) = delete;
        file_descriptor& operator=(file_descriptor&&) = delete;
 
-       file_descriptor(file_descriptor&& other) noexcept {
-               LTTNG_ASSERT(_is_valid_fd(_raw_fd));
+       file_descriptor(file_descriptor&& other) noexcept
+       {
                std::swap(_raw_fd, other._raw_fd);
        }
 
This page took 0.025299 seconds and 4 git commands to generate.