Age | Commit message (Collapse) | Author | Files | Lines |
|
storage size as int, but does *not* alias it
* This is the case e.g. on NetBSD 10 for ARMv6 where Sci::Position == ptrdiff_t == long int,
but obviously for other platforms as well, where it causes "invalid conversion"
and "undefined symbol" errors.
Scintilla was testing for aliasability by comparing the storage size with sizeof()
or PTRDIFF_MAX == INT_MAX at the preprocessor level.
This was fundamentally flawed.
* In LineVector<T>::InsertLines() we are now using the C++17 construct
std::is_convertible_v<From*,To*> instead.
* We need RunStyles<ptrdiff_t> as well on the affected platforms.
AFAIK this is impossible to test for in a constant expression that can be used
with the preprocessor.
A workaround has been added previously for Haiku:
https://groups.google.com/g/scintilla-interest/c/xPXquJUIXo8/m/BLXBpTTgBwAJ
The workaround is not very robust, as probably nobody guarantees that ptrdiff_t
never aliases on Haiku. If it does, you will suddenly get errors about duplicate
template instantiations.
Quite possibly, the explicit instantiations of RunStyles were wrong on certain
32-bit Linux variants as well.
* We could have tried to explicitly instantiate RunStyles for all scalar types that could possibly be behind ptrdiff_t.
Unfortunately, it would result in "possible loss of data" warnings on MSVC.
Instead, we now implicitly instantiate RunStyles.
|
|
*not* alias it"
This reverts commit 0953ffeee80abdd8e79ddacc7066eb02c78968e7.
|
|
alias it
* This is the case e.g. on NetBSD 10 for ARMv6 where Sci::Position == ptrdiff_t == long int,
but obviously for other platforms as well, where it causes "invalid conversion"
and "undefined symbol" errors.
Scintilla was testing for aliasability by comparing the storage size with sizeof()
or PTRDIFF_MAX == INT_MAX at the preprocessor level.
This was fundamentally flawed.
* In LineVector<T>::InsertLines() we are now using the C++17 construct
std::is_convertible_v<From*,To*> instead.
* We need RunStyles<ptrdiff_t> as well on the affected platforms.
AFAIK this is impossible to test for in a constant expression that can be used
with the preprocessor.
A workaround has been added previously for Haiku:
https://groups.google.com/g/scintilla-interest/c/xPXquJUIXo8/m/BLXBpTTgBwAJ
The workaround is not very robust, as probably nobody guarantees that ptrdiff_t
never aliases on Haiku. If it does, you will suddenly get errors about duplicate
template instantiations.
Instead we now instantiate RunStyles for all scalar types that could possibly be behind ptrdiff_t.
This will always be more than what is required on any particular platform,
but the linker should eliminate unused symbols.
|
|
|
|
|
|
nesting depth.
|
|
|
|
|
|
|
|
|
|
Write more documentation for undo history.
|
|
when invalid.
|
|
|
|
on mayCoalesce flag to indicate that a user operation is complete when false.
|
|
step. This saves about 50% for a long sequence of single byte actions.
|
|
that is used for reporting undo steps to Document.
This will allow further minimization of undo memory use.
|
|
tests but hidden from most of Scintilla.
Access through std::unique_ptr.
|
|
|
|
|
|
|
|
|
|
|
|
CellBuffer fields.
Declare LineEnd noexcept as it should never throw and that allows methods
calling it to also be noexcept.
Call LineEndPosition to simplify Editor::LineSelectionRange.
|
|
|
|
performing undo before start of change history can crash.
|
|
in the margin or in the text.
|
|
Change targetAct type to avoid type widening warnings.
|
|
|
|
contained types. This allows flexibility as most lower-level data types can be
moved and SplitVector and Partitioning of non-move-only types may be copied.
CellBuffer still needs destructor due to incomplete type so retains all standard
operations.
|
|
|
|
|
|
|
|
to hold some number of lines. This is an optimization that can decrease
reallocation overhead.
|
|
widely.
Ensure that case where all text is after the gap is as efficient as when all
text is before the gap.
|
|
and ScintillaStructures.h using scoped enumerations.
Use these headers instead of Scintilla.h internally.
External definitions go in the Scintilla namespace and internal definitio0ns in
Scintilla::Internal.
|
|
not be visible to most code.
|
|
|
|
|
|
almost everywhere.
|
|
PLATFORM_ASSERT is used in data structure headers which led to including
graphics and windowing APIs in data structure modules.
|
|
|
|
|
|
Avoids construction of temporary array.
|
|
table-driven line end discovery algorithm and performing line insertions in
batches.
|
|
LineStartIndex::Active.
|
|
|
|
The destructors of the members will ensure that everything is correct.
Potential unhandled exceptions reported by Coverity.
|
|
Init was not needed in LineVector as each field is constructed to a good state.
This code worked correctly before this change.
|
|
|
|
|