refactor: migration to std::make_unique C++17

Signed-off-by: Semenov Herman (Семенов Герман) <GermanAizek@yandex.ru>
This commit is contained in:
Semenov Herman (Семенов Герман)
2025-01-04 22:04:33 +03:00
committed by Compute-Runtime-Automation
parent d50beb5df4
commit 4cf685cb7d
17 changed files with 47 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2024 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -903,7 +903,7 @@ void CommandQueue::enqueueBlockedMapUnmapOperation(const cl_event *eventWaitList
} }
// store task data in event // store task data in event
auto cmd = std::unique_ptr<Command>(new CommandMapUnmap(opType, *memObj, copySize, copyOffset, readOnly, *this)); auto cmd = std::make_unique<CommandMapUnmap>(opType, *memObj, copySize, copyOffset, readOnly, *this);
eventBuilder->getEvent()->setCommand(std::move(cmd)); eventBuilder->getEvent()->setCommand(std::move(cmd));
// bind output event with input events // bind output event with input events

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2023 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -78,7 +78,7 @@ void VASharingFunctions::initFunctions() {
void VASharingFunctions::querySupportedVaImageFormats(VADisplay vaDisplay) { void VASharingFunctions::querySupportedVaImageFormats(VADisplay vaDisplay) {
int maxFormats = this->maxNumImageFormats(vaDisplay); int maxFormats = this->maxNumImageFormats(vaDisplay);
if (maxFormats > 0) { if (maxFormats > 0) {
std::unique_ptr<VAImageFormat[]> allVaFormats(new VAImageFormat[maxFormats]); auto allVaFormats = std::make_unique<VAImageFormat[]>(maxFormats);
auto result = this->queryImageFormats(vaDisplay, allVaFormats.get(), &maxFormats); auto result = this->queryImageFormats(vaDisplay, allVaFormats.get(), &maxFormats);
if (result == VA_STATUS_SUCCESS) { if (result == VA_STATUS_SUCCESS) {
for (int i = 0; i < maxFormats; i++) { for (int i = 0; i < maxFormats; i++) {

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2021-2023 Intel Corporation * Copyright (C) 2021-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -79,7 +79,7 @@ void ClFileLogger<debugLevel>::dumpKernelArgs(const MultiDispatchInfo *multiDisp
type = "immediate"; type = "immediate";
auto crossThreadData = kernel->getCrossThreadData(); auto crossThreadData = kernel->getCrossThreadData();
auto crossThreadDataSize = kernel->getCrossThreadDataSize(); auto crossThreadDataSize = kernel->getCrossThreadDataSize();
argVal = std::unique_ptr<char[]>(new char[crossThreadDataSize]); argVal = std::make_unique<char[]>(crossThreadDataSize);
size_t totalArgSize = 0; size_t totalArgSize = 0;
for (const auto &element : arg.as<ArgDescValue>().elements) { for (const auto &element : arg.as<ArgDescValue>().elements) {

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020-2024 Intel Corporation * Copyright (C) 2020-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -143,7 +143,7 @@ std::vector<char> OclocArgHelper::readBinaryFile(const std::string &filename) {
std::unique_ptr<char[]> OclocArgHelper::loadDataFromFile(const std::string &filename, size_t &retSize) { std::unique_ptr<char[]> OclocArgHelper::loadDataFromFile(const std::string &filename, size_t &retSize) {
if (Source *s = findSourceFile(filename)) { if (Source *s = findSourceFile(filename)) {
auto size = s->length; auto size = s->length;
std::unique_ptr<char[]> ret(new char[size]()); auto ret = std::make_unique<char[]>(size);
memcpy_s(ret.get(), size, s->data, s->length); memcpy_s(ret.get(), size, s->data, s->length);
retSize = s->length; retSize = s->length;
return ret; return ret;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2021-2024 Intel Corporation * Copyright (C) 2021-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -120,8 +120,7 @@ template <PRODUCT_FAMILY product>
class AILConfigurationHw : public AILConfiguration { class AILConfigurationHw : public AILConfiguration {
public: public:
static std::unique_ptr<AILConfiguration> create() { static std::unique_ptr<AILConfiguration> create() {
auto ailConfiguration = std::unique_ptr<AILConfiguration>(new AILConfigurationHw()); return std::make_unique<AILConfigurationHw>();
return ailConfiguration;
} }
void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) override; void applyExt(RuntimeCapabilityTable &runtimeCapabilityTable) override;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2024 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -173,8 +173,8 @@ BuiltinResourceT EmbeddedStorage::loadImpl(const std::string &fullResourceName)
} }
BuiltinsLib::BuiltinsLib() { BuiltinsLib::BuiltinsLib() {
allStorages.push_back(std::unique_ptr<Storage>(new EmbeddedStorage(""))); allStorages.push_back(std::make_unique<EmbeddedStorage>(""));
allStorages.push_back(std::unique_ptr<Storage>(new FileStorage(getDriverInstallationPath()))); allStorages.push_back(std::make_unique<FileStorage>(getDriverInstallationPath()));
} }
BuiltinCode BuiltinsLib::getBuiltinCode(EBuiltInOps::Type builtin, BuiltinCode::ECodeType requestedCodeType, Device &device) { BuiltinCode BuiltinsLib::getBuiltinCode(EBuiltInOps::Type builtin, BuiltinCode::ECodeType requestedCodeType, Device &device) {

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019-2024 Intel Corporation * Copyright (C) 2019-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -120,7 +120,7 @@ CommandContainer::ErrorCode CommandContainer::initialize(Device *device, Allocat
addToResidencyContainer(cmdBufferAllocation); addToResidencyContainer(cmdBufferAllocation);
if (requireHeaps) { if (requireHeaps) {
heapHelper = std::unique_ptr<HeapHelper>(new HeapHelper(device->getMemoryManager(), device->getDefaultEngine().commandStreamReceiver->getInternalAllocationStorage(), device->getNumGenericSubDevices() > 1u)); heapHelper = std::make_unique<HeapHelper>(device->getMemoryManager(), device->getDefaultEngine().commandStreamReceiver->getInternalAllocationStorage(), device->getNumGenericSubDevices() > 1u);
for (uint32_t i = 0; i < IndirectHeap::Type::numTypes; i++) { for (uint32_t i = 0; i < IndirectHeap::Type::numTypes; i++) {
auto heapType = static_cast<HeapType>(i); auto heapType = static_cast<HeapType>(i);

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2022 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -9,6 +9,6 @@
namespace NEO { namespace NEO {
std::unique_ptr<DeferredDeleter> createDeferredDeleter() { std::unique_ptr<DeferredDeleter> createDeferredDeleter() {
return std::unique_ptr<DeferredDeleter>(new DeferredDeleter()); return std::make_unique<DeferredDeleter>();
} }
} // namespace NEO } // namespace NEO

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2024 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -792,7 +792,7 @@ GraphicsAllocation *DrmMemoryManager::allocatePhysicalDeviceMemory(const Allocat
auto isCoherent = productHelper.isCoherentAllocation(patIndex); auto isCoherent = productHelper.isCoherentAllocation(patIndex);
uint32_t handle = ioctlHelper->createGem(bufferSize, static_cast<uint32_t>(allocationData.storageInfo.memoryBanks.to_ulong()), isCoherent); uint32_t handle = ioctlHelper->createGem(bufferSize, static_cast<uint32_t>(allocationData.storageInfo.memoryBanks.to_ulong()), isCoherent);
std::unique_ptr<BufferObject, BufferObject::Deleter> bo(new BufferObject(allocationData.rootDeviceIndex, &drm, patIndex, handle, bufferSize, maxOsContextCount)); auto bo = std::make_unique<BufferObject>(allocationData.rootDeviceIndex, &drm, patIndex, handle, bufferSize, maxOsContextCount);
auto allocation = new DrmAllocation(allocationData.rootDeviceIndex, 1u /*num gmms*/, allocationData.type, bo.get(), nullptr, 0u, bufferSize, memoryPool); auto allocation = new DrmAllocation(allocationData.rootDeviceIndex, 1u /*num gmms*/, allocationData.type, bo.get(), nullptr, 0u, bufferSize, memoryPool);
allocation->setDefaultGmm(gmm.release()); allocation->setDefaultGmm(gmm.release());
@@ -841,7 +841,7 @@ GraphicsAllocation *DrmMemoryManager::allocateMemoryByKMD(const AllocationData &
boType = BufferObject::BOType::legacy; boType = BufferObject::BOType::legacy;
} }
std::unique_ptr<BufferObject, BufferObject::Deleter> bo(new BufferObject(allocationData.rootDeviceIndex, &drm, patIndex, handle, bufferSize, maxOsContextCount)); auto bo = std::make_unique<BufferObject>(allocationData.rootDeviceIndex, &drm, patIndex, handle, bufferSize, maxOsContextCount);
bo->setAddress(gpuRange); bo->setAddress(gpuRange);
bo->setBOType(boType); bo->setBOType(boType);
@@ -2682,7 +2682,7 @@ GraphicsAllocation *DrmMemoryManager::createSharedUnifiedMemoryAllocation(const
return nullptr; return nullptr;
} }
std::unique_ptr<BufferObject, BufferObject::Deleter> bo(new BufferObject(allocationData.rootDeviceIndex, &drm, patIndex, handle, currentSize, maxOsContextCount)); auto bo = std::make_unique<BufferObject>(allocationData.rootDeviceIndex, &drm, patIndex, handle, currentSize, maxOsContextCount);
if (vmAdviseAttribute.has_value() && !ioctlHelper->setVmBoAdvise(bo->peekHandle(), vmAdviseAttribute.value(), nullptr)) { if (vmAdviseAttribute.has_value() && !ioctlHelper->setVmBoAdvise(bo->peekHandle(), vmAdviseAttribute.value(), nullptr)) {
ioctlHelper->munmapFunction(*this, cpuBasePointer, totalSizeToAlloc); ioctlHelper->munmapFunction(*this, cpuBasePointer, totalSizeToAlloc);

View File

@@ -503,7 +503,7 @@ std::unique_ptr<uint8_t[]> IoctlHelperPrelim20::prepareVmBindExt(const StackVec<
"Alignment of a buffer returned via new[] operator must allow storing the required type!"); "Alignment of a buffer returned via new[] operator must allow storing the required type!");
const auto bufferSize{sizeof(prelim_drm_i915_vm_bind_ext_uuid) * bindExtHandles.size()}; const auto bufferSize{sizeof(prelim_drm_i915_vm_bind_ext_uuid) * bindExtHandles.size()};
std::unique_ptr<uint8_t[]> extensionsBuffer{new uint8_t[bufferSize]}; auto extensionsBuffer = std::make_unique<uint8_t[]>(bufferSize);
auto extensions = new (extensionsBuffer.get()) prelim_drm_i915_vm_bind_ext_uuid[bindExtHandles.size()]; auto extensions = new (extensionsBuffer.get()) prelim_drm_i915_vm_bind_ext_uuid[bindExtHandles.size()];
std::memset(extensionsBuffer.get(), 0, bufferSize); std::memset(extensionsBuffer.get(), 0, bufferSize);

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020-2024 Intel Corporation * Copyright (C) 2020-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -17,7 +17,7 @@ decltype(&Thread::create) Thread::createFunc = Thread::create;
std::unique_ptr<Thread> Thread::create(void *(*func)(void *), void *arg) { std::unique_ptr<Thread> Thread::create(void *(*func)(void *), void *arg) {
pthread_t threadId; pthread_t threadId;
pthread_create(&threadId, nullptr, func, arg); pthread_create(&threadId, nullptr, func, arg);
return std::unique_ptr<Thread>(new ThreadLinux(threadId)); return std::make_unique<ThreadLinux>(threadId);
} }
void ThreadLinux::join() { void ThreadLinux::join() {

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2024 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -71,7 +71,7 @@ uint64_t OSTimeLinux::getCpuRawTimestamp() {
} }
std::unique_ptr<OSTime> OSTimeLinux::create(OSInterface &osInterface, std::unique_ptr<DeviceTime> deviceTime) { std::unique_ptr<OSTime> OSTimeLinux::create(OSInterface &osInterface, std::unique_ptr<DeviceTime> deviceTime) {
return std::unique_ptr<OSTime>(new OSTimeLinux(osInterface, std::move(deviceTime))); return std::make_unique<OSTimeLinux>(osInterface, std::move(deviceTime));
} }
} // namespace NEO } // namespace NEO

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2024 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -67,7 +67,7 @@ Wddm::Wddm(std::unique_ptr<HwDeviceIdWddm> &&hwDeviceIdIn, RootDeviceEnvironment
memset(gtSystemInfo.get(), 0, sizeof(*gtSystemInfo)); memset(gtSystemInfo.get(), 0, sizeof(*gtSystemInfo));
memset(gfxPlatform.get(), 0, sizeof(*gfxPlatform)); memset(gfxPlatform.get(), 0, sizeof(*gfxPlatform));
this->enablePreemptionRegValue = NEO::readEnablePreemptionRegKey(); this->enablePreemptionRegValue = NEO::readEnablePreemptionRegKey();
kmDafListener = std::unique_ptr<KmDafListener>(new KmDafListener); kmDafListener = std::make_unique<KmDafListener>();
temporaryResources = std::make_unique<WddmResidentAllocationsContainer>(this); temporaryResources = std::make_unique<WddmResidentAllocationsContainer>(this);
osMemory = OSMemory::create(); osMemory = OSMemory::create();
bool forceCheck = false; bool forceCheck = false;
@@ -864,10 +864,10 @@ bool Wddm::openSharedHandle(const MemoryManager::OsHandleData &osHandleData, Wdd
return false; return false;
} }
std::unique_ptr<char[]> allocPrivateData(new char[queryResourceInfo.TotalPrivateDriverDataSize]); auto allocPrivateData = std::make_unique<char[]>(queryResourceInfo.TotalPrivateDriverDataSize);
std::unique_ptr<char[]> resPrivateData(new char[queryResourceInfo.ResourcePrivateDriverDataSize]); auto resPrivateData = std::make_unique<char[]>(queryResourceInfo.ResourcePrivateDriverDataSize);
std::unique_ptr<char[]> resPrivateRuntimeData(new char[queryResourceInfo.PrivateRuntimeDataSize]); auto resPrivateRuntimeData = std::make_unique<char[]>(queryResourceInfo.PrivateRuntimeDataSize);
std::unique_ptr<D3DDDI_OPENALLOCATIONINFO[]> allocationInfo(new D3DDDI_OPENALLOCATIONINFO[queryResourceInfo.NumAllocations]); auto allocationInfo = std::make_unique<D3DDDI_OPENALLOCATIONINFO[]>(queryResourceInfo.NumAllocations);
D3DKMT_OPENRESOURCE openResource = {}; D3DKMT_OPENRESOURCE openResource = {};
@@ -914,10 +914,10 @@ bool Wddm::openNTHandle(const MemoryManager::OsHandleData &osHandleData, WddmAll
return false; return false;
} }
std::unique_ptr<char[]> allocPrivateData(new char[queryResourceInfoFromNtHandle.TotalPrivateDriverDataSize]); auto allocPrivateData = std::make_unique<char>(queryResourceInfoFromNtHandle.TotalPrivateDriverDataSize);
std::unique_ptr<char[]> resPrivateData(new char[queryResourceInfoFromNtHandle.ResourcePrivateDriverDataSize]); auto resPrivateData = std::make_unique<char>(queryResourceInfoFromNtHandle.ResourcePrivateDriverDataSize);
std::unique_ptr<char[]> resPrivateRuntimeData(new char[queryResourceInfoFromNtHandle.PrivateRuntimeDataSize]); auto resPrivateRuntimeData = std::make_unique<char>(queryResourceInfoFromNtHandle.PrivateRuntimeDataSize);
std::unique_ptr<D3DDDI_OPENALLOCATIONINFO2[]> allocationInfo2(new D3DDDI_OPENALLOCATIONINFO2[queryResourceInfoFromNtHandle.NumAllocations]); auto allocationInfo2 = std::make_unique<D3DDDI_OPENALLOCATIONINFO2[]>(queryResourceInfoFromNtHandle.NumAllocations);
D3DKMT_OPENRESOURCEFROMNTHANDLE openResourceFromNtHandle = {}; D3DKMT_OPENRESOURCEFROMNTHANDLE openResourceFromNtHandle = {};

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2023 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -59,7 +59,7 @@ void PrintFormatter::printString(const char *formatString, const std::function<v
size_t length = strnlen_s(formatString, maxSinglePrintStringLength - 1); size_t length = strnlen_s(formatString, maxSinglePrintStringLength - 1);
size_t cursor = 0; size_t cursor = 0;
std::unique_ptr<char[]> dataFormat(new char[length + 1]); auto dataFormat = std::make_unique<char[]>(length + 1);
for (size_t i = 0; i <= length; i++) { for (size_t i = 0; i <= length; i++) {
if (formatString[i] == '\\') if (formatString[i] == '\\')

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2023 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -463,7 +463,7 @@ template <typename NodeObjectType, bool threadSafe = true, bool ownsNodes = true
class IDRefList : public IDList<IDNodeRef<NodeObjectType>, threadSafe, ownsNodes> { class IDRefList : public IDList<IDNodeRef<NodeObjectType>, threadSafe, ownsNodes> {
public: public:
void pushRefFrontOne(NodeObjectType &node) { void pushRefFrontOne(NodeObjectType &node) {
auto refNode = std::unique_ptr<IDNodeRef<NodeObjectType>>(new IDNodeRef<NodeObjectType>(&node)); auto refNode = std::make_unique<IDNodeRef<NodeObjectType>>(&node);
this->pushFrontOne(*refNode); this->pushFrontOne(*refNode);
refNode.release(); refNode.release();
} }

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2023 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -189,7 +189,7 @@ template <typename NodeObjectType, bool threadSafe = true, bool ownsNodes = true
class IFRefList : public IFList<IFNodeRef<NodeObjectType>, threadSafe, ownsNodes> { class IFRefList : public IFList<IFNodeRef<NodeObjectType>, threadSafe, ownsNodes> {
public: public:
void pushRefFrontOne(NodeObjectType &node) { void pushRefFrontOne(NodeObjectType &node) {
auto up = std::unique_ptr<IFNodeRef<NodeObjectType>>(new IFNodeRef<NodeObjectType>(&node)); auto up = std::make_unique<IFNodeRef<NodeObjectType>>(&node);
this->pushFrontOne(*up); this->pushFrontOne(*up);
up.release(); up.release();
} // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) } // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2023 Intel Corporation * Copyright (C) 2018-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -29,8 +29,8 @@ PerfProfiler *PerfProfiler::create(bool dumpToFile) {
if (gPerfProfiler == nullptr) { if (gPerfProfiler == nullptr) {
int old = counter.fetch_add(1); int old = counter.fetch_add(1);
if (!dumpToFile) { if (!dumpToFile) {
std::unique_ptr<std::stringstream> logs = std::unique_ptr<std::stringstream>(new std::stringstream()); auto logs = std::make_unique<std::stringstream>();
std::unique_ptr<std::stringstream> sysLogs = std::unique_ptr<std::stringstream>(new std::stringstream()); auto sysLogs = std::make_unique<std::stringstream>();
gPerfProfiler = new PerfProfiler(old, std::move(logs), std::move(sysLogs)); gPerfProfiler = new PerfProfiler(old, std::move(logs), std::move(sysLogs));
} else { } else {
gPerfProfiler = new PerfProfiler(old); gPerfProfiler = new PerfProfiler(old);
@@ -63,7 +63,7 @@ PerfProfiler::PerfProfiler(int id, std::unique_ptr<std::ostream> &&logOut, std::
std::stringstream filename; std::stringstream filename;
filename << "PerfReport_Thread_" << id << ".xml"; filename << "PerfReport_Thread_" << id << ".xml";
std::unique_ptr<std::ofstream> logToFile = std::unique_ptr<std::ofstream>(new std::ofstream()); auto logToFile = std::make_unique<std::ofstream>();
logToFile->exceptions(std::ios::failbit | std::ios::badbit); logToFile->exceptions(std::ios::failbit | std::ios::badbit);
logToFile->open(filename.str().c_str(), std::ios::trunc); logToFile->open(filename.str().c_str(), std::ios::trunc);
this->logFile = std::move(logToFile); this->logFile = std::move(logToFile);
@@ -77,7 +77,7 @@ PerfProfiler::PerfProfiler(int id, std::unique_ptr<std::ostream> &&logOut, std::
std::stringstream filename; std::stringstream filename;
filename << "SysPerfReport_Thread_" << id << ".xml"; filename << "SysPerfReport_Thread_" << id << ".xml";
std::unique_ptr<std::ofstream> sysLogToFile = std::unique_ptr<std::ofstream>(new std::ofstream()); auto sysLogToFile = std::make_unique<std::ofstream>();
sysLogToFile->exceptions(std::ios::failbit | std::ios::badbit); sysLogToFile->exceptions(std::ios::failbit | std::ios::badbit);
sysLogToFile->open(filename.str().c_str(), std::ios::trunc); sysLogToFile->open(filename.str().c_str(), std::ios::trunc);
this->sysLogFile = std::move(sysLogToFile); this->sysLogFile = std::move(sysLogToFile);