From 2e0d358cdc05494caeb11c2d30dc49b3ebc3a92f Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Sun, 6 Sep 2020 09:24:24 +0200 Subject: [PATCH] Adapt for VS2019 builds with toolkit v142 Fix #9922, close #9942 --- PowerEditor/src/NppCommands.cpp | 3 ++- PowerEditor/visual.net/notepadPlus.vcxproj | 14 ++++++------ appveyor.yml | 4 ++-- boostregex/BoostRegExSearch.cxx | 3 +++ boostregex/UTF8DocumentIterator.cxx | 25 ++++++++++++++++++++++ boostregex/UTF8DocumentIterator.h | 23 +------------------- scintilla/win32/SciLexer.vcxproj | 4 ++-- 7 files changed, 42 insertions(+), 34 deletions(-) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index d32bbadf8..522daa353 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -487,7 +487,8 @@ void Notepad_plus::command(int id) if (nppGui._searchEngineChoice == nppGui.se_custom) { url = nppGui._searchEngineCustom; - remove_if(url.begin(), url.end(), _istspace); + url.erase(std::remove_if(url.begin(), url.end(), [](_TUCHAR x) {return _istspace(x); }), + url.end()); auto httpPos = url.find(TEXT("http://")); auto httpsPos = url.find(TEXT("https://")); diff --git a/PowerEditor/visual.net/notepadPlus.vcxproj b/PowerEditor/visual.net/notepadPlus.vcxproj index 2e0033c8e..b05d6c158 100755 --- a/PowerEditor/visual.net/notepadPlus.vcxproj +++ b/PowerEditor/visual.net/notepadPlus.vcxproj @@ -31,40 +31,40 @@ {FCF60E65-1B78-4D1D-AB59-4FC00AC8C248} Notepad++ Win32Proj - 10.0.17763.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/appveyor.yml b/appveyor.yml index 5f58f9a45..56feb76ad 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: 7.9.{build} -image: Visual Studio 2017 +image: Visual Studio 2019 environment: @@ -27,7 +27,7 @@ configuration: install: - if "%Platform%"=="mingw-w64_810_X64" set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH:C:\Program Files\Git\usr\bin;=% - - if "%archi%" NEQ "" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi% + - if "%archi%" NEQ "" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %archi% build_script: - ps: | diff --git a/boostregex/BoostRegExSearch.cxx b/boostregex/BoostRegExSearch.cxx index 7c07efe87..25d272bc8 100644 --- a/boostregex/BoostRegExSearch.cxx +++ b/boostregex/BoostRegExSearch.cxx @@ -13,6 +13,9 @@ #include #include #include +#include +#include +#include #include "Scintilla.h" #include "Platform.h" #include "ILoader.h" diff --git a/boostregex/UTF8DocumentIterator.cxx b/boostregex/UTF8DocumentIterator.cxx index 50518ce55..880aa2a09 100644 --- a/boostregex/UTF8DocumentIterator.cxx +++ b/boostregex/UTF8DocumentIterator.cxx @@ -1,10 +1,14 @@ #include "UTF8DocumentIterator.h" +#include +#include +#include #include "ILoader.h" #include "ILexer.h" #include "Scintilla.h" +#include "Platform.h" @@ -58,6 +62,27 @@ UTF8DocumentIterator::UTF8DocumentIterator(const UTF8DocumentIterator& copy) : } } +UTF8DocumentIterator& UTF8DocumentIterator::operator ++ () +{ + PLATFORM_ASSERT(m_pos < m_end); + if (m_utf16Length == 2 && m_characterIndex == 0) + { + m_characterIndex = 1; + } + else + { + m_pos += m_utf8Length; + + if (m_pos > m_end) + { + m_pos = m_end; + } + m_characterIndex = 0; + readCharacter(); + } + return *this; +} + UTF8DocumentIterator& UTF8DocumentIterator::operator -- () { if (m_utf16Length == 2 && m_characterIndex == 1) diff --git a/boostregex/UTF8DocumentIterator.h b/boostregex/UTF8DocumentIterator.h index aaf15914b..320a926dc 100644 --- a/boostregex/UTF8DocumentIterator.h +++ b/boostregex/UTF8DocumentIterator.h @@ -5,7 +5,6 @@ #include #include #include -#include "Platform.h" #include "Position.h" namespace Scintilla { @@ -41,27 +40,7 @@ public: return *this; } - UTF8DocumentIterator& operator ++ () - { - PLATFORM_ASSERT(m_pos < m_end); - if (m_utf16Length == 2 && m_characterIndex == 0) - { - m_characterIndex = 1; - } - else - { - m_pos += m_utf8Length; - - if (m_pos > m_end) - { - m_pos = m_end; - } - m_characterIndex = 0; - readCharacter(); - } - return *this; - } - + UTF8DocumentIterator& operator ++ (); UTF8DocumentIterator& operator -- (); Sci::Position pos() const diff --git a/scintilla/win32/SciLexer.vcxproj b/scintilla/win32/SciLexer.vcxproj index 57c75471a..58d36a05e 100644 --- a/scintilla/win32/SciLexer.vcxproj +++ b/scintilla/win32/SciLexer.vcxproj @@ -30,13 +30,13 @@ {FBE04237-9C7B-4973-9C60-505975998B39} Win32Proj SciLexer - 10.0.17763.0 + 10.0 StaticLibrary Unicode - v141 + v142 lib$(ProjectName)