Simplified VectorArena to always take an arena and to not support change of capacity
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Romeo
|
||||
|
||||
struct Database
|
||||
{
|
||||
Juliet::VectorArena<FileEntry, 512, true> Entries = {};
|
||||
Juliet::VectorArena<FileEntry, 512> Entries = {};
|
||||
Juliet::Arena* DbArena = nullptr;
|
||||
Juliet::Mutex Mutex;
|
||||
};
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace Romeo
|
||||
double NumVal = 0.0;
|
||||
Juliet::String StrVal = {};
|
||||
|
||||
Juliet::VectorArena<JsonValue, 32, true> ArrayVal = {};
|
||||
Juliet::VectorArena<JsonKeyValue, 32, true> ObjectVal = {};
|
||||
Juliet::VectorArena<JsonValue, 32> ArrayVal = {};
|
||||
Juliet::VectorArena<JsonKeyValue, 32> ObjectVal = {};
|
||||
};
|
||||
|
||||
// Parses a JSON string. Memory is allocated on the provided arena.
|
||||
|
||||
@@ -410,7 +410,7 @@ namespace Romeo
|
||||
static void ParseSymbolsFromFile(
|
||||
Juliet::Arena* arena,
|
||||
const Juliet::String& filePath,
|
||||
Juliet::VectorArena<ParsedSymbol, 128, true>& outSymbols
|
||||
Juliet::VectorArena<ParsedSymbol, 128>& outSymbols
|
||||
)
|
||||
{
|
||||
Assert(arena != nullptr);
|
||||
@@ -726,7 +726,7 @@ namespace Romeo
|
||||
static void FormatAndWriteSymbols(StringBuilder& sb, Juliet::Arena* arena, const Juliet::String& filePath)
|
||||
{
|
||||
printf("Romeo: FormatAndWriteSymbols start for %.*s\n", static_cast<int>(filePath.Size), CStr(filePath));
|
||||
Juliet::VectorArena<ParsedSymbol, 128, true> symbols = {};
|
||||
Juliet::VectorArena<ParsedSymbol, 128> symbols = {};
|
||||
symbols.Create(arena JULIET_DEBUG_ONLY(, "ParsedSymbols"));
|
||||
|
||||
printf("Romeo: Calling ParseSymbolsFromFile...\n");
|
||||
@@ -741,7 +741,7 @@ namespace Romeo
|
||||
|
||||
// Collect all distinct namespaces
|
||||
printf("Romeo: Collecting namespaces...\n");
|
||||
Juliet::VectorArena<Juliet::String, 16, true> namespaces = {};
|
||||
Juliet::VectorArena<Juliet::String, 16> namespaces = {};
|
||||
namespaces.Create(arena JULIET_DEBUG_ONLY(, "NamespacesList"));
|
||||
|
||||
for (const ParsedSymbol& sym : symbols)
|
||||
|
||||
Reference in New Issue
Block a user