Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions include/cpptoml.h
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,12 @@ class parser

if (curr_table->contains(part))
{
#if !defined(__PGI)
auto b = curr_table->get(part);
#else
// Workaround for PGI compiler
std::shared_ptr<base> b = curr_table->get(part);
#endif
if (b->is_table())
curr_table = static_cast<table*>(b.get());
else if (b->is_table_array())
Expand Down Expand Up @@ -2009,7 +2014,12 @@ class parser

if (curr_table->contains(part))
{
#if !defined(__PGI)
auto b = curr_table->get(part);
#else
// Workaround for PGI compiler
std::shared_ptr<base> b = curr_table->get(part);
#endif

// if this is the end of the table array name, add an
// element to the table array that we just looked up
Expand Down Expand Up @@ -2850,9 +2860,9 @@ class parser
auto arr = make_array();
while (it != end && *it != ']')
{
auto value = parse_value(it, end);
if (auto v = value->as<Value>())
arr->get().push_back(value);
auto val = parse_value(it, end);
if (auto v = val->as<Value>())
arr->get().push_back(val);
else
throw_parse_exception("Arrays must be homogeneous");
skip_whitespace_and_comments(it, end);
Expand Down