From 4f66ac015acacf0bf75a6568337414a873ad4b99 Mon Sep 17 00:00:00 2001 From: Bob Kast Date: Thu, 4 Mar 2021 10:30:21 -0500 Subject: [PATCH] set compiler to latest C++ standard stdcpplatest --- ECSUtil/CRWLock.cpp | 2 +- ECSUtil/CRWLock.h | 2 +- ECSUtil/CSharedQueue.cpp | 2 +- ECSUtil/CSharedQueue.h | 8 ++++---- ECSUtil/CngAES_GCM.cpp | 2 +- ECSUtil/CngAES_GCM.h | 2 +- ECSUtil/DLLFUNC.H | 2 +- ECSUtil/ECSConnection.cpp | 4 ++-- ECSUtil/ECSConnection.h | 8 ++++---- ECSUtil/ECSGlobal.cpp | 2 +- ECSUtil/ECSGlobal.h | 2 +- ECSUtil/ECSUtil.cpp | 2 +- ECSUtil/ECSUtil.h | 2 +- ECSUtil/ECSUtil.vcxproj | 12 ++++++++++++ ECSUtil/FileSupport.cpp | 2 +- ECSUtil/FileSupport.h | 2 +- ECSUtil/GetAllThreads.cpp | 2 +- ECSUtil/GetAllThreads.h | 2 +- ECSUtil/Logging.cpp | 4 ++-- ECSUtil/Logging.h | 2 +- ECSUtil/NTERRTXT.CPP | 2 +- ECSUtil/NTERRTXT.H | 2 +- ECSUtil/ProcessEvent.cpp | 2 +- ECSUtil/ProcessEvent.h | 2 +- ECSUtil/S3Error.cpp | 2 +- ECSUtil/S3Error.h | 2 +- ECSUtil/SimpleWorkerThread.cpp | 4 ++-- ECSUtil/SimpleWorkerThread.h | 2 +- ECSUtil/ThreadPool.cpp | 2 +- ECSUtil/ThreadPool.h | 30 +++++++++++++++--------------- ECSUtil/UriUtils.cpp | 2 +- ECSUtil/UriUtils.h | 2 +- ECSUtil/Version.h | 4 ++-- ECSUtil/XmlLiteUtil.cpp | 2 +- ECSUtil/XmlLiteUtil.h | 2 +- ECSUtil/cbuffer.cpp | 4 ++-- ECSUtil/cbuffer.h | 2 +- ECSUtil/dyndll.h | 2 +- ECSUtil/exportdef.h | 2 +- ECSUtil/fmtnum.cpp | 2 +- ECSUtil/fmtnum.h | 2 +- ECSUtil/generic_defs.h | 2 +- ECSUtil/libhandle.h | 2 +- ECSUtil/stdafx.cpp | 2 +- ECSUtil/stdafx.h | 2 +- ECSUtil/targetver.h | 2 +- ECSUtil/widestring.h | 2 +- S3Test/Resource.h | 2 +- S3Test/S3Test.cpp | 2 +- S3Test/S3Test.h | 2 +- S3Test/S3Test.vcxproj | 12 ++++++++++++ S3Test/stdafx.cpp | 2 +- S3Test/stdafx.h | 2 +- S3Test/targetver.h | 2 +- 54 files changed, 101 insertions(+), 77 deletions(-) diff --git a/ECSUtil/CRWLock.cpp b/ECSUtil/CRWLock.cpp index a9fe8e4..5e794a3 100644 --- a/ECSUtil/CRWLock.cpp +++ b/ECSUtil/CRWLock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/CRWLock.h b/ECSUtil/CRWLock.h index 0b521ce..21a98dc 100644 --- a/ECSUtil/CRWLock.h +++ b/ECSUtil/CRWLock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/CSharedQueue.cpp b/ECSUtil/CSharedQueue.cpp index c18bf95..00fca9e 100644 --- a/ECSUtil/CSharedQueue.cpp +++ b/ECSUtil/CSharedQueue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/CSharedQueue.h b/ECSUtil/CSharedQueue.h index 1fc50a4..e0734ea 100644 --- a/ECSUtil/CSharedQueue.h +++ b/ECSUtil/CSharedQueue.h @@ -181,25 +181,25 @@ namespace ecs_sdk return list::empty(); }; - list::reference front() + typename list::reference front() { // return first element of mutable sequence CRWLockAcquire lockQueue(const_cast(&rwlQueue), true); // write lock return list::front(); } - list::const_reference front() const + typename list::const_reference front() const { // return first element of nonmutable sequence CRWLockAcquire lockQueue(const_cast(&rwlQueue), false); // read lock return list::front(); } - list::reference back() + typename list::reference back() { // return last element of mutable sequence CRWLockAcquire lockQueue(const_cast(&rwlQueue), true); // write lock return list::back(); } - list::const_reference back() const + typename list::const_reference back() const { // return last element of nonmutable sequence CRWLockAcquire lockQueue(const_cast(&rwlQueue), false); // read lock return list::back(); diff --git a/ECSUtil/CngAES_GCM.cpp b/ECSUtil/CngAES_GCM.cpp index aa27dde..1ca16ed 100644 --- a/ECSUtil/CngAES_GCM.cpp +++ b/ECSUtil/CngAES_GCM.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/CngAES_GCM.h b/ECSUtil/CngAES_GCM.h index 61b3e44..e07a0cd 100644 --- a/ECSUtil/CngAES_GCM.h +++ b/ECSUtil/CngAES_GCM.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/DLLFUNC.H b/ECSUtil/DLLFUNC.H index bfc20d6..46e043a 100644 --- a/ECSUtil/DLLFUNC.H +++ b/ECSUtil/DLLFUNC.H @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/ECSConnection.cpp b/ECSUtil/ECSConnection.cpp index 611c596..0b3f054 100644 --- a/ECSUtil/ECSConnection.cpp +++ b/ECSUtil/ECSConnection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -72,7 +72,7 @@ DWORD CECSConnection::dwMaxRetryCount(MaxRetryCount); // max retries for HTTP DWORD CECSConnection::dwPauseBetweenRetries(500); // pause between retries (millisec) DWORD CECSConnection::dwPauseAfter500Error(500); // pause between retries after HTTP 500 error (millisec) -static TCHAR *SystemMDInit[] = +static LPCWSTR SystemMDInit[] = { _T("ObjectName"), _T("Owner"), diff --git a/ECSUtil/ECSConnection.h b/ECSUtil/ECSConnection.h index c910adc..8774d25 100644 --- a/ECSUtil/ECSConnection.h +++ b/ECSUtil/ECSConnection.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -1042,7 +1042,7 @@ class ECSUTIL_EXT_CLASS CECSConnection bool bComplete = false; // set if the command has completed bool bHandleCreated = false; // WINHTTP_CALLBACK_STATUS_HANDLE_CREATED bool bHandleClosing = false; // WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING - bool *pbCallbackRegistered = false; // pointer to flag indicating the callback has been registered + bool *pbCallbackRegistered = nullptr; // pointer to flag indicating the callback has been registered bool bDisableSecureLog = false; // if set, don't log security errors in the callback BYTE *pReadData = nullptr; // WINHTTP_CALLBACK_STATUS_READ_COMPLETE CECSConnection *pHost = nullptr; // allow access to the host record @@ -1539,8 +1539,8 @@ class ECSUTIL_EXT_CLASS CECSConnection static void SetGlobalHttpsProtocol(DWORD dwGlobalHttpsProtocolParam); static void SetS3BucketListingMax(DWORD dwS3BucketListingMaxParam); static void SetRetries(DWORD dwMaxRetryCountParam, DWORD dwPauseBetweenRetriesParam = 500, DWORD dwPauseAfter500ErrorParam = 500); - static DWORD CECSConnection::SetRootCertificate(const ECS_CERT_INFO& CertInfo, DWORD dwCertOpenFlags = CERT_STORE_OPEN_EXISTING_FLAG | CERT_SYSTEM_STORE_LOCAL_MACHINE, LPCTSTR pszStoreName = _T("Root")); - static CString CECSConnection::GetSecureErrorText(DWORD dwSecureError); + static DWORD SetRootCertificate(const ECS_CERT_INFO& CertInfo, DWORD dwCertOpenFlags = CERT_STORE_OPEN_EXISTING_FLAG | CERT_SYSTEM_STORE_LOCAL_MACHINE, LPCTSTR pszStoreName = _T("Root")); + static CString GetSecureErrorText(DWORD dwSecureError); static CString FormatSecurityInfo(const WINHTTP_SECURITY_INFO& SecurityInfo); static void SetInitialized(void); // global initialized flag. must be called to set regular timeouts diff --git a/ECSUtil/ECSGlobal.cpp b/ECSUtil/ECSGlobal.cpp index a3a03c8..eec2bed 100644 --- a/ECSUtil/ECSGlobal.cpp +++ b/ECSUtil/ECSGlobal.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. +* Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/ECSGlobal.h b/ECSUtil/ECSGlobal.h index 53267bf..12a9330 100644 --- a/ECSUtil/ECSGlobal.h +++ b/ECSUtil/ECSGlobal.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. +* Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/ECSUtil.cpp b/ECSUtil/ECSUtil.cpp index cb0c6f2..3dd9bed 100644 --- a/ECSUtil/ECSUtil.cpp +++ b/ECSUtil/ECSUtil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/ECSUtil.h b/ECSUtil/ECSUtil.h index 651dc07..d589432 100644 --- a/ECSUtil/ECSUtil.h +++ b/ECSUtil/ECSUtil.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/ECSUtil.vcxproj b/ECSUtil/ECSUtil.vcxproj index 2a1b2ac..9250ce1 100644 --- a/ECSUtil/ECSUtil.vcxproj +++ b/ECSUtil/ECSUtil.vcxproj @@ -271,6 +271,7 @@ false false ProgramDatabase + stdcpplatest Windows @@ -303,6 +304,7 @@ false false OldStyle + stdcpplatest Windows @@ -331,6 +333,7 @@ false false OldStyle + stdcpplatest Windows @@ -360,6 +363,7 @@ false ProgramDatabase false + stdcpplatest Windows @@ -393,6 +397,7 @@ false OldStyle false + stdcpplatest Windows @@ -419,6 +424,7 @@ false OldStyle false + stdcpplatest Windows @@ -448,6 +454,7 @@ AnySuitable Speed true + stdcpplatest Windows @@ -487,6 +494,7 @@ AnySuitable Speed true + stdcpplatest Windows @@ -522,6 +530,7 @@ AnySuitable Speed true + stdcpplatest Windows @@ -556,6 +565,7 @@ AnySuitable Speed true + stdcpplatest Windows @@ -595,6 +605,7 @@ AnySuitable Speed true + stdcpplatest Windows @@ -627,6 +638,7 @@ AnySuitable Speed true + stdcpplatest Windows diff --git a/ECSUtil/FileSupport.cpp b/ECSUtil/FileSupport.cpp index 60c66e1..87f7a35 100644 --- a/ECSUtil/FileSupport.cpp +++ b/ECSUtil/FileSupport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/FileSupport.h b/ECSUtil/FileSupport.h index c9ceadb..3ad9c99 100644 --- a/ECSUtil/FileSupport.h +++ b/ECSUtil/FileSupport.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/GetAllThreads.cpp b/ECSUtil/GetAllThreads.cpp index e8ee487..339b976 100644 --- a/ECSUtil/GetAllThreads.cpp +++ b/ECSUtil/GetAllThreads.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/GetAllThreads.h b/ECSUtil/GetAllThreads.h index 73ad2e4..0613874 100644 --- a/ECSUtil/GetAllThreads.h +++ b/ECSUtil/GetAllThreads.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/Logging.cpp b/ECSUtil/Logging.cpp index 51a2fc2..f189b9c 100644 --- a/ECSUtil/Logging.cpp +++ b/ECSUtil/Logging.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ void LogMessageVa(LPCTSTR pszFile, DWORD dwLine, LPCTSTR pszLogMessage, NTSTATUS sMsg.FormatMessageV(pszLogMessage, &marker); if (pLogMessageCB == nullptr) { - OutputDebugString(sMsg + ((dwError == ERROR_SUCCESS) ? _T("") : _T(" - ") + GetNTErrorText(dwError))); + OutputDebugString(sMsg + ((dwError == ERROR_SUCCESS) ? _T("") : (LPCTSTR)(_T(" - ") + GetNTErrorText(dwError)))); } else { diff --git a/ECSUtil/Logging.h b/ECSUtil/Logging.h index 0377387..bea7d06 100644 --- a/ECSUtil/Logging.h +++ b/ECSUtil/Logging.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/NTERRTXT.CPP b/ECSUtil/NTERRTXT.CPP index 4688c16..d96fa22 100644 --- a/ECSUtil/NTERRTXT.CPP +++ b/ECSUtil/NTERRTXT.CPP @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/NTERRTXT.H b/ECSUtil/NTERRTXT.H index 46f145a..6433599 100644 --- a/ECSUtil/NTERRTXT.H +++ b/ECSUtil/NTERRTXT.H @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/ProcessEvent.cpp b/ECSUtil/ProcessEvent.cpp index 98e4771..52fc44a 100644 --- a/ECSUtil/ProcessEvent.cpp +++ b/ECSUtil/ProcessEvent.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/ProcessEvent.h b/ECSUtil/ProcessEvent.h index 9780583..2e7d600 100644 --- a/ECSUtil/ProcessEvent.h +++ b/ECSUtil/ProcessEvent.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/S3Error.cpp b/ECSUtil/S3Error.cpp index bfbbe11..8a603d6 100644 --- a/ECSUtil/S3Error.cpp +++ b/ECSUtil/S3Error.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/S3Error.h b/ECSUtil/S3Error.h index 01dd8a3..b88552b 100644 --- a/ECSUtil/S3Error.h +++ b/ECSUtil/S3Error.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/SimpleWorkerThread.cpp b/ECSUtil/SimpleWorkerThread.cpp index 6b21f3d..64f1e74 100644 --- a/ECSUtil/SimpleWorkerThread.cpp +++ b/ECSUtil/SimpleWorkerThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -131,7 +131,7 @@ bool CSimpleWorkerThread::CreateThread( (void)pThread->ResumeThread(); // wait for it to die. (void)WaitForSingleObject(pThread->m_hThread, SECONDS(1)); - return nullptr; + return false; } // if win10 or later, set thread description if (bGotThreadDescription) diff --git a/ECSUtil/SimpleWorkerThread.h b/ECSUtil/SimpleWorkerThread.h index 5514957..43a700d 100644 --- a/ECSUtil/SimpleWorkerThread.h +++ b/ECSUtil/SimpleWorkerThread.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/ThreadPool.cpp b/ECSUtil/ThreadPool.cpp index 2c0360b..a6b31de 100644 --- a/ECSUtil/ThreadPool.cpp +++ b/ECSUtil/ThreadPool.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/ThreadPool.h b/ECSUtil/ThreadPool.h index 7fe3aa3..41a9b2e 100644 --- a/ECSUtil/ThreadPool.h +++ b/ECSUtil/ThreadPool.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -293,7 +293,7 @@ void CThreadWork::SetInUse(void) CRWLockAcquire lockMsg(&pThreadPool->MsgQueue.GetLock(), true); // write lock bInUse = true; DWORD dwWorkCount = 0; - for (CSharedQueue>::iterator itPool = pThreadPool->Pool.begin(); itPool != pThreadPool->Pool.end(); ++itPool) + for (typename CSharedQueue>::iterator itPool = pThreadPool->Pool.begin(); itPool != pThreadPool->Pool.end(); ++itPool) if (itPool->bInUse) dwWorkCount++; if (pThreadPool->pdwPerfWorkItems != nullptr) @@ -524,7 +524,7 @@ CThreadPool::~CThreadPool() template bool CThreadPool::IfInGroup(UINT uGrouping) const { - for (CSharedQueue>::const_iterator itPool = Pool.begin(); itPool != Pool.end(); ++itPool) + for (typename CSharedQueue>::const_iterator itPool = Pool.begin(); itPool != Pool.end(); ++itPool) { if (itPool->bInUse) { @@ -654,7 +654,7 @@ DWORD CThreadPool::GetNumThreadsInternal( CRWLockAcquire lock(&Pool.GetLock(), bExclusive); // read lock or write lock if bExclusive is set DWORD dwCount = MsgQueue.GetCount(); // get current length of queue DWORD dwThreads = 0; - for (CSharedQueue>::const_iterator itPool = Pool.begin(); itPool != Pool.end(); ++itPool) + for (typename CSharedQueue>::const_iterator itPool = Pool.begin(); itPool != Pool.end(); ++itPool) { if ((dwIgnoreCurrentThreadID == 0) || (itPool->GetCurrentThreadID() != dwIgnoreCurrentThreadID)) { @@ -676,7 +676,7 @@ template void CThreadPool::GetCurrentWorkItems(list& RetList) const { CRWLockAcquire lock(&Pool.GetLock(), false); // read lock - for (CSharedQueue>::const_iterator itPool = Pool.begin(); itPool != Pool.end(); ++itPool) + for (typename CSharedQueue>::const_iterator itPool = Pool.begin(); itPool != Pool.end(); ++itPool) if (itPool->IfActive() && itPool->bInUse) { RetList.push_back(*itPool->Msg); @@ -742,7 +742,7 @@ void CThreadPool::SendMessageToPool( DWORD dwThreadID = GetCurrentThreadId(); { CRWLockAcquire lockPool(&Pool.GetLock(), false); // always lock pool first, then msg if you need both locked - for (CSharedQueue>::iterator itPool = Pool.begin(); itPool != Pool.end(); ++itPool) + for (typename CSharedQueue>::iterator itPool = Pool.begin(); itPool != Pool.end(); ++itPool) { if (itPool->GetCurrentThreadID() == dwThreadID) dwMaxQueueSize = 0; @@ -856,7 +856,7 @@ DWORD CThreadPool::SearchMessageBackModify(const MsgT& MsgFind, UINT uSear bRewind = false; // a callback can request that we rewind to the start to do it all over bDone = false; - for (CSharedQueue::reverse_iterator itMsg = MsgQueue.rbegin(); !bDone && (itMsg != MsgQueue.rend()); ) + for (typename CSharedQueue::reverse_iterator itMsg = MsgQueue.rbegin(); !bDone && (itMsg != MsgQueue.rend()); ) { bool bDelete = false; if (!itMsg->Control.bProcessing) // if it is at the head of the list and being processed, don't deal with it @@ -901,7 +901,7 @@ bool CThreadPool::SearchMessage(const MsgT& MsgFind, MsgT *pPayloadRet, UI CRWLockAcquire lockPool(&Pool.GetLock(), false); // always lock pool first, then msg if you need both locked { CRWLockAcquire lockMsg(&MsgQueue.GetLock(), false); - for (CSharedQueue::const_iterator itMsg = MsgQueue.begin(); itMsg != MsgQueue.end(); ++itMsg) + for (typename CSharedQueue::const_iterator itMsg = MsgQueue.begin(); itMsg != MsgQueue.end(); ++itMsg) { if (bInProcess || !itMsg->Control.bProcessing) { @@ -928,7 +928,7 @@ bool CThreadPool::SearchMessageKill(const MsgT& MsgFind, UINT uSearchType) do { bRetry = false; - for (CSharedQueue::iterator itMsg = MsgQueue.begin(); itMsg != MsgQueue.end(); ++itMsg) + for (typename CSharedQueue::iterator itMsg = MsgQueue.begin(); itMsg != MsgQueue.end(); ++itMsg) { if (!itMsg->Control.bProcessing) // if it is at the head of the list and being processed, don't deal with it { @@ -1031,7 +1031,7 @@ void CThreadPool::UpdatePerf(UINT uLine, std::shared_ptr *pMsg, CThr Rec.Control.ftDueTime = ftNow + ((ULONGLONG)dwDelay * (FT_SECONDS(1) / SECONDS(1))); } bool bInserted = false; - for (CSharedQueue::reverse_iterator itMsg = MsgQueue.rbegin(); itMsg != MsgQueue.rend(); itMsg++) + for (typename CSharedQueue::reverse_iterator itMsg = MsgQueue.rbegin(); itMsg != MsgQueue.rend(); itMsg++) { if (itMsg->Control.uPriority >= uPriority) { @@ -1070,14 +1070,14 @@ void CThreadPool::DumpQueue(void *pContext) const { CRWLockAcquire lockMsg(&MsgQueue.GetLock(), false); // read lock - for (CSharedQueue::const_iterator itMsg = MsgQueue.begin(); itMsg != MsgQueue.end(); itMsg++) + for (typename CSharedQueue::const_iterator itMsg = MsgQueue.begin(); itMsg != MsgQueue.end(); itMsg++) { if (!DumpEntry(false, *itMsg->Payload, pContext)) return; } } // now do the entries currently in process - for (CSharedQueue>::const_iterator itPool = Pool.begin(); itPool != Pool.end(); itPool++) + for (typename CSharedQueue>::const_iterator itPool = Pool.begin(); itPool != Pool.end(); itPool++) { if (itPool->IfActive() && itPool->bInUse) { @@ -1118,7 +1118,7 @@ void CThreadPool::DeleteOldThreadEntries(void) FILETIME ftNow; GetSystemTimeAsFileTime(&ftNow); CRWLockAcquire lockPool(&Pool.GetLock(), true); // write lock - for (CSharedQueue>::iterator itPool = Pool.begin(); itPool != Pool.end(); ) + for (typename CSharedQueue>::iterator itPool = Pool.begin(); itPool != Pool.end(); ) { if (!itPool->IfActive() && ((itPool->ftIdleTime + FT_SECONDS(30)) < ftNow)) itPool = Pool.erase(itPool); @@ -1204,7 +1204,7 @@ void CThreadPool::TransferFutureQueue(bool bFlush) // if bFlush == true, { CRWLockAcquire lock(&MsgQueue.GetLock(), false); // read lock bFoundDueMsg = false; - for (CSharedQueue::CMsgEntry>::iterator itFuture = FutureMsgQueue.begin(); itFuture != FutureMsgQueue.end(); ++itFuture) + for (typename CSharedQueue::CMsgEntry>::iterator itFuture = FutureMsgQueue.begin(); itFuture != FutureMsgQueue.end(); ++itFuture) { if (bFlush || (ftNow >= itFuture->Control.ftDueTime)) { @@ -1219,7 +1219,7 @@ void CThreadPool::TransferFutureQueue(bool bFlush) // if bFlush == true, // now remove it from the FutureMsgQueue { CRWLockAcquire lock(&MsgQueue.GetLock(), true); // write lock - for (CSharedQueue::CMsgEntry>::iterator itFuture = FutureMsgQueue.begin(); itFuture != FutureMsgQueue.end(); ++itFuture) + for (typename CSharedQueue::CMsgEntry>::iterator itFuture = FutureMsgQueue.begin(); itFuture != FutureMsgQueue.end(); ++itFuture) { if (DueMsg.Control.ullUniqueID == itFuture->Control.ullUniqueID) { diff --git a/ECSUtil/UriUtils.cpp b/ECSUtil/UriUtils.cpp index 157771a..d463de2 100644 --- a/ECSUtil/UriUtils.cpp +++ b/ECSUtil/UriUtils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/UriUtils.h b/ECSUtil/UriUtils.h index c986c30..e142e82 100644 --- a/ECSUtil/UriUtils.h +++ b/ECSUtil/UriUtils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/Version.h b/ECSUtil/Version.h index 6f222a6..4badb46 100644 --- a/ECSUtil/Version.h +++ b/ECSUtil/Version.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. +* Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ #define ECSUTIL_COPYRIGHT _T("Copyright © 2021 Dell Inc. or its subsidiaries.") -#define ECSUTIL_VERSION "v1.0.7.16" +#define ECSUTIL_VERSION "v1.0.7.17" diff --git a/ECSUtil/XmlLiteUtil.cpp b/ECSUtil/XmlLiteUtil.cpp index 7546d8b..2534927 100644 --- a/ECSUtil/XmlLiteUtil.cpp +++ b/ECSUtil/XmlLiteUtil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/XmlLiteUtil.h b/ECSUtil/XmlLiteUtil.h index e74ef07..738c823 100644 --- a/ECSUtil/XmlLiteUtil.h +++ b/ECSUtil/XmlLiteUtil.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/cbuffer.cpp b/ECSUtil/cbuffer.cpp index 48d3721..b966254 100644 --- a/ECSUtil/cbuffer.cpp +++ b/ECSUtil/cbuffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -323,7 +323,7 @@ namespace ecs_sdk // int CBuffer::Compare(const CBuffer& Buf) const { - register DWORD nSize = GetBufSize(); + DWORD nSize = GetBufSize(); int iDiff = nSize - Buf.GetBufSize(); if ((iDiff == 0) && (nSize != 0)) { diff --git a/ECSUtil/cbuffer.h b/ECSUtil/cbuffer.h index 7b2ee2e..c7d8b71 100644 --- a/ECSUtil/cbuffer.h +++ b/ECSUtil/cbuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/dyndll.h b/ECSUtil/dyndll.h index 6edbf4e..820e244 100644 --- a/ECSUtil/dyndll.h +++ b/ECSUtil/dyndll.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/exportdef.h b/ECSUtil/exportdef.h index 0258c1c..8ff1c47 100644 --- a/ECSUtil/exportdef.h +++ b/ECSUtil/exportdef.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/fmtnum.cpp b/ECSUtil/fmtnum.cpp index 88a4f9a..fc764db 100644 --- a/ECSUtil/fmtnum.cpp +++ b/ECSUtil/fmtnum.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/fmtnum.h b/ECSUtil/fmtnum.h index b867e96..daa0ad7 100644 --- a/ECSUtil/fmtnum.h +++ b/ECSUtil/fmtnum.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/generic_defs.h b/ECSUtil/generic_defs.h index 9c2363b..003c0d1 100644 --- a/ECSUtil/generic_defs.h +++ b/ECSUtil/generic_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/libhandle.h b/ECSUtil/libhandle.h index e000807..ce250e3 100644 --- a/ECSUtil/libhandle.h +++ b/ECSUtil/libhandle.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/stdafx.cpp b/ECSUtil/stdafx.cpp index 68e61bb..d6c63cc 100644 --- a/ECSUtil/stdafx.cpp +++ b/ECSUtil/stdafx.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/stdafx.h b/ECSUtil/stdafx.h index 0ca47e5..ee5732b 100644 --- a/ECSUtil/stdafx.h +++ b/ECSUtil/stdafx.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/targetver.h b/ECSUtil/targetver.h index 2fd8d58..cad936d 100644 --- a/ECSUtil/targetver.h +++ b/ECSUtil/targetver.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/ECSUtil/widestring.h b/ECSUtil/widestring.h index 3425efb..3b7650a 100644 --- a/ECSUtil/widestring.h +++ b/ECSUtil/widestring.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/S3Test/Resource.h b/S3Test/Resource.h index 48f8f26..1e3ccba 100644 --- a/S3Test/Resource.h +++ b/S3Test/Resource.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/S3Test/S3Test.cpp b/S3Test/S3Test.cpp index 7131ec0..54f077c 100644 --- a/S3Test/S3Test.cpp +++ b/S3Test/S3Test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/S3Test/S3Test.h b/S3Test/S3Test.h index 5ab63ab..809d8e2 100644 --- a/S3Test/S3Test.h +++ b/S3Test/S3Test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/S3Test/S3Test.vcxproj b/S3Test/S3Test.vcxproj index f289182..7f69dfb 100644 --- a/S3Test/S3Test.vcxproj +++ b/S3Test/S3Test.vcxproj @@ -257,6 +257,7 @@ ECSUTILDLL;NO_WARN_MBCS_MFC_DEPRECATION;_CONSOLE;WIN32;_DEBUG;%(PreprocessorDefinitions) true $(SolutionDir)ECSUtil\ + stdcpplatest Console @@ -274,6 +275,7 @@ NO_WARN_MBCS_MFC_DEPRECATION;_CONSOLE;WIN32;_DEBUG;%(PreprocessorDefinitions) true $(SolutionDir)ECSUtil\ + stdcpplatest Console @@ -291,6 +293,7 @@ NO_WARN_MBCS_MFC_DEPRECATION;_CONSOLE;WIN32;_DEBUG;%(PreprocessorDefinitions) true $(SolutionDir)ECSUtil\ + stdcpplatest Console @@ -309,6 +312,7 @@ true $(SolutionDir)ECSUtil\ false + stdcpplatest Console @@ -327,6 +331,7 @@ true $(SolutionDir)ECSUtil\ false + stdcpplatest Console @@ -345,6 +350,7 @@ true $(SolutionDir)ECSUtil\ false + stdcpplatest Console @@ -367,6 +373,7 @@ AnySuitable Speed true + stdcpplatest Console @@ -391,6 +398,7 @@ AnySuitable Speed true + stdcpplatest Console @@ -415,6 +423,7 @@ AnySuitable Speed true + stdcpplatest Console @@ -439,6 +448,7 @@ AnySuitable Speed true + stdcpplatest Console @@ -463,6 +473,7 @@ AnySuitable Speed true + stdcpplatest Console @@ -487,6 +498,7 @@ AnySuitable Speed true + stdcpplatest Console diff --git a/S3Test/stdafx.cpp b/S3Test/stdafx.cpp index c7705f0..c8cfcda 100644 --- a/S3Test/stdafx.cpp +++ b/S3Test/stdafx.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/S3Test/stdafx.h b/S3Test/stdafx.h index 8fb2624..3918a5a 100644 --- a/S3Test/stdafx.h +++ b/S3Test/stdafx.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. diff --git a/S3Test/targetver.h b/S3Test/targetver.h index 2fd8d58..cad936d 100644 --- a/S3Test/targetver.h +++ b/S3Test/targetver.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 - 2020, Dell Technologies, Inc. All Rights Reserved. + * Copyright (c) 2017 - 2021, Dell Technologies, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License.