Add some missing memory domains

This commit is contained in:
Maxime Coste 2015-09-12 10:51:16 +01:00
parent 8aca7622bf
commit 5173dad470
4 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ private:
String m_text; String m_text;
}; };
using AtomList = Vector<DisplayAtom>; using AtomList = Vector<DisplayAtom, MemoryDomain::Display>;
class DisplayLine : public UseMemoryDomain<MemoryDomain::Display> class DisplayLine : public UseMemoryDomain<MemoryDomain::Display>
{ {
@ -143,7 +143,7 @@ private:
class DisplayBuffer : public UseMemoryDomain<MemoryDomain::Display> class DisplayBuffer : public UseMemoryDomain<MemoryDomain::Display>
{ {
public: public:
using LineList = Vector<DisplayLine>; using LineList = Vector<DisplayLine, MemoryDomain::Display>;
DisplayBuffer() {} DisplayBuffer() {}
LineList& lines() { return m_lines; } LineList& lines() { return m_lines; }

View File

@ -418,7 +418,7 @@ Vector<String> complete_command(StringView prefix, ByteCount cursor_pos)
TimeSpec mtime = {}; TimeSpec mtime = {};
Vector<String> commands; Vector<String> commands;
}; };
static UnorderedMap<String, CommandCache> command_cache; static UnorderedMap<String, CommandCache, MemoryDomain::Commands> command_cache;
Vector<String> res; Vector<String> res;
for (auto dir : split(getenv("PATH"), ':')) for (auto dir : split(getenv("PATH"), ':'))

View File

@ -204,7 +204,7 @@ static int nc_color(Color color)
static int get_color_pair(const Face& face) static int get_color_pair(const Face& face)
{ {
using ColorPair = std::pair<Color, Color>; using ColorPair = std::pair<Color, Color>;
static UnorderedMap<ColorPair, int> colorpairs; static UnorderedMap<ColorPair, int, MemoryDomain::Faces> colorpairs;
static int next_pair = 1; static int next_pair = 1;
ColorPair colors{face.fg, face.bg}; ColorPair colors{face.fg, face.bg};

View File

@ -6,7 +6,7 @@
namespace Kakoune namespace Kakoune
{ {
using CaptureList = Vector<String>; using CaptureList = Vector<String, MemoryDomain::Selections>;
// A selection is a Selection, associated with a CaptureList // A selection is a Selection, associated with a CaptureList
struct Selection struct Selection