Skip to content

Commit

Permalink
set compiler to latest C++ standard
Browse files Browse the repository at this point in the history
<LanguageStandard>stdcpplatest</LanguageStandard>
  • Loading branch information
Bob Kast committed Mar 4, 2021
1 parent 0805752 commit 4f66ac0
Show file tree
Hide file tree
Showing 54 changed files with 101 additions and 77 deletions.
2 changes: 1 addition & 1 deletion ECSUtil/CRWLock.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/CRWLock.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/CSharedQueue.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 4 additions & 4 deletions ECSUtil/CSharedQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,25 +181,25 @@ namespace ecs_sdk
return list<T>::empty();
};

list<T>::reference front()
typename list<T>::reference front()
{ // return first element of mutable sequence
CRWLockAcquire lockQueue(const_cast<CRWLock*>(&rwlQueue), true); // write lock
return list<T>::front();
}

list<T>::const_reference front() const
typename list<T>::const_reference front() const
{ // return first element of nonmutable sequence
CRWLockAcquire lockQueue(const_cast<CRWLock*>(&rwlQueue), false); // read lock
return list<T>::front();
}

list<T>::reference back()
typename list<T>::reference back()
{ // return last element of mutable sequence
CRWLockAcquire lockQueue(const_cast<CRWLock*>(&rwlQueue), true); // write lock
return list<T>::back();
}

list<T>::const_reference back() const
typename list<T>::const_reference back() const
{ // return last element of nonmutable sequence
CRWLockAcquire lockQueue(const_cast<CRWLock*>(&rwlQueue), false); // read lock
return list<T>::back();
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/CngAES_GCM.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/CngAES_GCM.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/DLLFUNC.H
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions ECSUtil/ECSConnection.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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"),
Expand Down
8 changes: 4 additions & 4 deletions ECSUtil/ECSConnection.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/ECSGlobal.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/ECSGlobal.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/ECSUtil.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/ECSUtil.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 12 additions & 0 deletions ECSUtil/ECSUtil.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
<PreprocessToFile>false</PreprocessToFile>
<PreprocessKeepComments>false</PreprocessKeepComments>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -303,6 +304,7 @@
<PreprocessToFile>false</PreprocessToFile>
<PreprocessKeepComments>false</PreprocessKeepComments>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -331,6 +333,7 @@
<PreprocessToFile>false</PreprocessToFile>
<PreprocessKeepComments>false</PreprocessKeepComments>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -360,6 +363,7 @@
<PreprocessKeepComments>false</PreprocessKeepComments>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitFramePointers>false</OmitFramePointers>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -393,6 +397,7 @@
<PreprocessKeepComments>false</PreprocessKeepComments>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitFramePointers>false</OmitFramePointers>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -419,6 +424,7 @@
<PreprocessKeepComments>false</PreprocessKeepComments>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitFramePointers>false</OmitFramePointers>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -448,6 +454,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -487,6 +494,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -522,6 +530,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -556,6 +565,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -595,6 +605,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -627,6 +638,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/FileSupport.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/FileSupport.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/GetAllThreads.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/GetAllThreads.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions ECSUtil/Logging.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/Logging.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/NTERRTXT.CPP
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/NTERRTXT.H
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/ProcessEvent.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/ProcessEvent.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/S3Error.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/S3Error.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions ECSUtil/SimpleWorkerThread.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/SimpleWorkerThread.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ECSUtil/ThreadPool.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading

0 comments on commit 4f66ac0

Please sign in to comment.