Skip to content

Commit

Permalink
Codechange: Remove unnecessary vector for writing GRF parameter JSON (O…
Browse files Browse the repository at this point in the history
  • Loading branch information
JGRennison authored Jan 12, 2024
1 parent 54b57fb commit 479490d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/survey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,7 @@ void SurveyGrfs(nlohmann::json &survey)
if ((c->palette & GRFP_BLT_MASK) == GRFP_BLT_32BPP) grf["blitter"] = "32bpp";

grf["is_static"] = HasBit(c->flags, GCF_STATIC);

std::vector<uint32_t> parameters;
for (int i = 0; i < c->num_params; i++) {
parameters.push_back(c->param[i]);
}
grf["parameters"] = parameters;
grf["parameters"] = span<const uint32_t>(c->param.data(), c->num_params);
}
}

Expand Down

0 comments on commit 479490d

Please sign in to comment.