File diff r12876:f6a9a5783c12 → r12877:d776236d9091
src/company_cmd.cpp
Show inline comments
 
@@ -54,24 +54,26 @@ INSTANTIATE_POOL_METHODS(Company)
 
Company::Company(uint16 name_1, bool is_ai) :
 
	name_1(name_1),
 
	location_of_HQ(INVALID_TILE),
 
	is_ai(is_ai)
 
{
 
	for (uint j = 0; j < 4; j++) this->share_owners[j] = COMPANY_SPECTATOR;
 
	InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, -1);
 
}
 

	
 
Company::~Company()
 
{
 
	free(this->name);
 
	free(this->president_name);
 
	free(this->num_engines);
 

	
 
	if (CleaningPool()) return;
 

	
 
	DeleteCompanyWindows(this->index);
 
	InvalidateWindowData(WC_GRAPH_LEGEND, 0, this->index);
 
	InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, this->index);
 
}
 

	
 
/**
 
 * Sets the local company and updates the settings that are set on a
 
 * per-company basis to reflect the core's state in the GUI.
 
 * @param new_company the new company