equal
deleted
inserted
replaced
558 |
558 |
559 /* Don't attempt a sort if there are no industries */ |
559 /* Don't attempt a sort if there are no industries */ |
560 if (GetNumIndustries() == 0) return; |
560 if (GetNumIndustries() == 0) return; |
561 |
561 |
562 /* Create array for sorting */ |
562 /* Create array for sorting */ |
563 ReallocT(&_industry_sort, GetMaxIndustryIndex() + 1); |
563 _industry_sort = ReallocT(_industry_sort, GetMaxIndustryIndex() + 1); |
564 if (_industry_sort == NULL) error("Could not allocate memory for the industry-sorting-list"); |
564 if (_industry_sort == NULL) error("Could not allocate memory for the industry-sorting-list"); |
565 |
565 |
566 FOR_ALL_INDUSTRIES(i) _industry_sort[n++] = i; |
566 FOR_ALL_INDUSTRIES(i) _industry_sort[n++] = i; |
567 |
567 |
568 _num_industry_sort = n; |
568 _num_industry_sort = n; |