From 9a400bd33f0cb4f322de4208bb7159673a399521 Mon Sep 17 00:00:00 2001 From: Mitchell Foral Date: Thu, 1 Dec 2022 17:27:09 +1100 Subject: Change release compilation optimization option to favour speed over space. -O2 for MSVC and -O3 for gcc and clang. Change code in Editor.cxx to avoid a warning that occurs with gcc -O3. --- doc/ScintillaHistory.html | 4 ++++ gtk/makefile | 2 +- src/Editor.cxx | 2 +- win32/makefile | 2 +- win32/scintilla.mak | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 1c919b7c2..a1a442137 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -610,6 +610,10 @@ Bug #2363.
  • + Change release compilation optimization option to favour speed over space. + -O2 for MSVC and -O3 for gcc and clang. +
  • +
  • On Win32, avoid blurry display with DirectWrite in GDI scaling mode. Bug #2344.
  • diff --git a/gtk/makefile b/gtk/makefile index a641f18e4..8643ae317 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -84,7 +84,7 @@ DEFINES += -DNO_CXX11_REGEX endif DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG) -BASE_FLAGS += $(if $(DEBUG),-g,-Os) +BASE_FLAGS += $(if $(DEBUG),-g,-O3) CXX_BASE_FLAGS =--std=c++17 $(BASE_FLAGS) CXX_ALL_FLAGS =$(DEFINES) $(INCLUDES) $(CXX_BASE_FLAGS) $(CONFIG_FLAGS) diff --git a/src/Editor.cxx b/src/Editor.cxx index 1fb6d960d..72a8a4bd8 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5872,7 +5872,7 @@ void Editor::StyleSetMessage(Message iMessage, uptr_t wParam, sptr_t lParam) { if (!(classified & UTF8MaskInvalid)) { // valid UTF-8 int len = classified & UTF8MaskWidth; - while (len--) + for (int i=0; i