fix(layout): grow styles without contiguous reallocations
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <deque>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -370,7 +371,7 @@ public:
|
||||
private:
|
||||
std::vector<uint16_t> labelAt;
|
||||
std::vector<char> labels;
|
||||
std::vector<std::pair<uint16_t, Style>> styles;
|
||||
std::deque<std::pair<uint16_t, Style>> styles;
|
||||
// Linear rather than the sorted search styles use: a screen has one or two
|
||||
// scroll containers, so the binary search would cost more than the scan.
|
||||
std::vector<std::pair<uint16_t, Scroll>> scrollState;
|
||||
|
||||
Reference in New Issue
Block a user