fix cppcoreguidelines-*

* cppcoreguidelines-init-variables
* cppcoreguidelines-c-copy-assignment-signature
* cppcoreguidelines-macro-usage
* cppcoreguidelines-non-private-member-variables-in-classes
* cppcoreguidelines-pro-type-member-init
* cppcoreguidelines-slicing
* cppcoreguidelines-special-member-functions
* cppcoreguidelines-virtual-class-destructor
This commit is contained in:
wmayer
2023-11-15 17:12:50 +01:00
parent 39337ea12e
commit 08b10cd287
38 changed files with 418 additions and 166 deletions

View File

@@ -58,8 +58,9 @@ TimeInfo::~TimeInfo() = default;
void TimeInfo::setCurrent()
{
// clang-format off
#if defined(FC_OS_BSD) || defined(FC_OS_LINUX) || defined(__MINGW32__)
struct timeval tv;
struct timeval tv {};
gettimeofday(&tv, nullptr);
timebuffer.time = tv.tv_sec;
timebuffer.millitm = tv.tv_usec / 1000;
@@ -68,6 +69,7 @@ void TimeInfo::setCurrent()
#else
ftime(&timebuffer); // deprecated
#endif
// clang-format on
}
void TimeInfo::setTime_t(int64_t seconds)