Changeset - r28439:449edb5ac692
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 11 months ago 2024-01-12 21:38:31
j.g.rennison@gmail.com
Codechange: Remove unnecessary vector for writing GRF parameter JSON (#11763)
1 file changed with 1 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/survey.cpp
Show inline comments
 
@@ -335,18 +335,13 @@ void SurveyGrfs(nlohmann::json &survey)
 
		if ((c->palette & GRFP_GRF_MASK) == GRFP_GRF_ANY) grf["palette"] = "any";
 

	
 
		if ((c->palette & GRFP_BLT_MASK) == GRFP_BLT_UNSET) grf["blitter"] = "unset";
 
		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);
 
	}
 
}
 

	
 
/**
 
 * Convert game-script information to JSON.
 
 *
0 comments (0 inline, 0 general)