Skip to content

Commit

Permalink
json: don't report unvisited when exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei8l committed Aug 28, 2024
1 parent da2486f commit 29b7397
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/flexbuffer_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "cata_unreachable.h"
#include "filesystem.h"
#include "game.h"
#include "json.h"

namespace
Expand Down Expand Up @@ -252,6 +253,9 @@ bool JsonValue::read( std::string &s, bool throw_on_error ) const
void JsonObject::report_unvisited() const
{
#ifndef CATA_IN_TOOL
if( g && g->uquit == quit_status::QUIT_EXIT ) {
return;
}
if( !std::uncaught_exceptions() && report_unvisited_members && !visited_fields_bitset_.all() ) {
std::vector<size_t> skipped_members;
skipped_members.reserve( visited_fields_bitset_.size() );
Expand Down

0 comments on commit 29b7397

Please sign in to comment.