throw() is deprecated in C++17
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7000 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
cf3859c733
commit
bca384e691
3 changed files with 12 additions and 7 deletions
|
@ -1037,9 +1037,14 @@ typedef struct tagVS_FIXEDFILEINFO {
|
|||
|
||||
|
||||
#if defined(__clang__) && defined(__cplusplus) && __cplusplus < 201103L
|
||||
#define NSIS_CXX_THROWSPEC(throwspec) throw(throwspec) // Use exception specifications to avoid operator new missing-exception-spec warning
|
||||
# define NSIS_CXX_THROWSPEC(throwspec) throw(throwspec) // Use exception specifications to avoid operator new missing-exception-spec warning
|
||||
#else
|
||||
#define NSIS_CXX_THROWSPEC(ignoredthrowspec) // Ignore c++ exception specifications
|
||||
# define NSIS_CXX_THROWSPEC(ignoredthrowspec) // Ignore c++ exception specifications
|
||||
#endif
|
||||
#if defined(__cplusplus) && __cplusplus >= 201103L
|
||||
# define NSIS_CXX_NOEXCEPT() noexcept(true)
|
||||
#else
|
||||
# define NSIS_CXX_NOEXCEPT() throw() // Can't specialize __declspec(nothrow) because MSVC requires it before the function name
|
||||
#endif
|
||||
#define BUGBUG64TRUNCATE(cast,xpr) ( (cast) (xpr) )
|
||||
|
||||
|
@ -1048,7 +1053,7 @@ _tprintf on Windows/MSVCRT treats %s as TCHAR* and on POSIX %s is always char*!
|
|||
Always use our NPRI* (NsisPRInt*[Narrow|Wide]) defines in format strings when calling
|
||||
functions from tchar.h (Similar to the way <inttypes.h> works)
|
||||
|
||||
Example: _tprintf(_T("Hello %") NPRIs _T("\n"), _T("World"));
|
||||
Example: _tprintf(_T("%") NPRIs _T(" %") NPRIws _T("\n"), _T("Hello"), L"World");
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
# define NPRIs _T("s")
|
||||
|
|
|
@ -235,11 +235,11 @@ void CEXEBuild::del_date_time_predefines()
|
|||
TCHAR* CEXEBuild::GetMacro(const TCHAR *macroname, TCHAR**macroend /*= 0*/)
|
||||
{
|
||||
TCHAR *t = (TCHAR*)m_macros.get(), *mbeg, *mbufbeg = t;
|
||||
size_t cbAll = m_macros.getlen(), cchAll = cbAll / sizeof(TCHAR);
|
||||
size_t cbAll = m_macros.getlen();
|
||||
for (; t && *t; ++t)
|
||||
{
|
||||
mbeg = t;
|
||||
if (t-mbufbeg >= cchAll) break;
|
||||
if ((size_t)t - (size_t)mbufbeg >= cbAll) break;
|
||||
const bool foundit = !_tcsicmp(mbeg, macroname);
|
||||
t += _tcslen(t) + 1; // advance over macro name
|
||||
|
||||
|
|
|
@ -1354,5 +1354,5 @@ void *operator new[](size_t size) NSIS_CXX_THROWSPEC(bad_alloc)
|
|||
{
|
||||
return operator new(size);
|
||||
}
|
||||
void operator delete(void *p) throw() { if (p) free(p); }
|
||||
void operator delete [](void *p) throw() { if (p) free(p); }
|
||||
void operator delete(void *p) NSIS_CXX_NOEXCEPT() { if (p) free(p); }
|
||||
void operator delete [](void *p) NSIS_CXX_NOEXCEPT() { if (p) free(p); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue