Skip to content

Commit

Permalink
statetest: Workaround GCC 13 -Wdangling-reference (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast authored May 8, 2023
1 parent 100c8f9 commit 550f0a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/statetest/statetest_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ static void from_json(const json::json& j, StateTransitionTest& o)
if (!j.is_object() || j.empty())
throw std::invalid_argument{"JSON test must be an object with single key of the test name"};

const auto& j_t = j.begin().value(); // Content is in a dict with the test name.
const auto& j_t = *j.begin(); // Content is in a dict with the test name.

o.pre_state = from_json<state::State>(j_t.at("pre"));

Expand Down

0 comments on commit 550f0a2

Please sign in to comment.