From 4e58c84854d2383fb3bea33e91ca7293277a8ecc Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Mon, 14 Oct 2019 13:23:29 -0700 Subject: [PATCH] liblog: remove obsolete comment The log_time struct satisfies all of the requirements for an implicitly created copy constructor to be present, so not defining one here does not have any real effect. We don't want to delete the copy constructor for the rationale given either; modern C++ favors passing small types by value instead of by reference as the compiler has more opportunity for optimization in that case. That's especially true here, where the size of this struct is the size of a pointer on 64 bit systems. Test: the copy constructor exists for log_time Change-Id: Id314ca7729f4b1ca02adb6c7f0ae759b22be2a5c --- liblog/include/log/log_time.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/liblog/include/log/log_time.h b/liblog/include/log/log_time.h index 09c991042..1b3333141 100644 --- a/liblog/include/log/log_time.h +++ b/liblog/include/log/log_time.h @@ -35,11 +35,6 @@ extern "C" { -/* - * NB: we did NOT define a copy constructor. This will result in structure - * no longer being compatible with pass-by-value which is desired - * efficient behavior. Also, pass-by-reference breaks C/C++ ABI. - */ struct log_time { public: uint32_t tv_sec = 0; /* good to Feb 5 2106 */