Commit Graph

16 Commits

Author SHA1 Message Date
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Matthias Mailänder
1b0e3a7a7f StyleCop clean OpenRA.Mods.RA 2015-01-04 17:02:46 +01:00
reaperrr
654f56c5d5 Moves Attack, Armament, Move, Air traits and activities as well as anything required by them to Mods.Common.
Extracts Exit from Production into its own trait.
2015-01-04 05:24:28 +01:00
reaperrr
9dfd369446 Move some Building traits and related elements to Mods.Common 2014-12-26 21:38:49 +01:00
reaperrr
d58807cdb8 Dissolve RA.Buildings namespace.
Move a handfull related, loose traits to RA.Traits as well.
2014-12-26 21:38:46 +01:00
reaperrr
127969d014 Move Air activities and traits to Activities\Air and Traits\Air, respectively 2014-11-17 12:56:18 +01:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
aec50426d5 Fix some broken logic in AI air targeting code 2013-11-02 17:19:07 +13:00
Paul Chote
d46c535850 Rename and simplify MayBeFlee -> ShouldFlee. 2013-08-29 20:14:37 +12:00
Paul Chote
f6730a6740 Remove StateBase.AverageUnitsPosition. 2013-08-29 20:14:36 +12:00
Paul Chote
ea1b5fc89d Remove explicit List<Actors> everywhere. 2013-08-29 20:14:36 +12:00
Paul Chote
5d142945eb Initial cleanup of StateBase. 2013-08-29 20:14:36 +12:00
Paul Chote
233ba81976 Change Squad.IsEmpty -> IsValid. 2013-08-29 20:14:36 +12:00
Paul Chote
de8c736ca4 Split HackyAI into a more manageable set of files. 2013-08-29 20:14:33 +12:00