From 51657e10769faa2617d546a06c42e4c62a19bb50 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 30 Jan 2022 17:41:24 +0100 Subject: Removed trailing whitespace all over the place --- Stars45/CombatGroup.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'Stars45/CombatGroup.cpp') diff --git a/Stars45/CombatGroup.cpp b/Stars45/CombatGroup.cpp index a8cf988..9b5088a 100644 --- a/Stars45/CombatGroup.cpp +++ b/Stars45/CombatGroup.cpp @@ -108,9 +108,9 @@ CombatGroup::IsTargetable() const return false; // civilian / non-combatant are not strategic targets: - if (type == PASSENGER || - type == PRIVATE || - type == MEDICAL || + if (type == PASSENGER || + type == PRIVATE || + type == MEDICAL || type == HABITAT) return false; @@ -135,9 +135,9 @@ CombatGroup::IsStrikeTarget() const { if (type < BATTALION || type == MINEFIELD || // assault, not strike - type == PASSENGER || - type == PRIVATE || - type == MEDICAL || + type == PASSENGER || + type == PRIVATE || + type == MEDICAL || type == HABITAT) return false; @@ -466,7 +466,7 @@ CombatGroup::GetOrdinal() const if (last_two_digits > 10 && last_two_digits < 20) { sprintf_s(ordinal, "ordinal.%d", last_two_digits); Text suffix = Game::GetText(ordinal); - + if (suffix != ordinal) sprintf_s(ordinal, "%d%s", id, suffix.data()); else @@ -536,7 +536,7 @@ CombatGroup::GetDescription() const case MEDICAL: sprintf_s(desc, "%s %s%s", GetOrdinal(), Game::GetText("CombatGroup.MEDICAL").data(), name_desc); break; case CIVILIAN: - case WAR_PRODUCTION: + case WAR_PRODUCTION: case FACTORY: case REFINERY: case RESOURCE: strcpy_s(desc, (const char*) name); break; @@ -594,7 +594,7 @@ CombatGroup::GetShortDescription() const case REPAIR: sprintf_s(desc, "%s %s", GetOrdinal(), Game::GetText("CombatGroup.abrv.REPAIR").data()); break; case CIVILIAN: - case WAR_PRODUCTION: + case WAR_PRODUCTION: case FACTORY: case REFINERY: case RESOURCE: strcpy_s(desc, (const char*) name); break; @@ -791,7 +791,7 @@ CombatGroup::FindCarrier() { CombatGroup* p = GetParent(); - while (p != 0 && + while (p != 0 && p->Type() != CombatGroup::CARRIER_GROUP && p->Type() != CombatGroup::STATION && p->Type() != CombatGroup::STARBASE) @@ -1014,7 +1014,7 @@ CombatGroup::LoadOrderOfBattle(const char* filename, int team, Combatant* combat do { delete term; term = 0; term = parser.ParseTerm(); - + if (term) { TermDef* def = term->isDef(); if (def) { @@ -1047,7 +1047,7 @@ CombatGroup::LoadOrderOfBattle(const char* filename, int team, Combatant* combat int unit_damage = 0; int unit_heading= 0; int unit_index = 0; - + *name = 0; *type = 0; *intel = 0; @@ -1064,7 +1064,7 @@ CombatGroup::LoadOrderOfBattle(const char* filename, int team, Combatant* combat // all groups in this OOB default to the IFF of the main force if (force) iff = force->GetIFF(); - + for (int i = 0; i < val->elements()->size(); i++) { TermDef* pdef = val->elements()->at(i)->isDef(); if (pdef && (iff < 0 || team < 0 || iff == team)) { @@ -1094,7 +1094,7 @@ CombatGroup::LoadOrderOfBattle(const char* filename, int team, Combatant* combat ZeroMemory(unit_region, sizeof(unit_region)); ZeroMemory(design, sizeof(design)); - + for (int i = 0; i < val->elements()->size(); i++) { TermDef* pdef = val->elements()->at(i)->isDef(); if (pdef) { @@ -1258,7 +1258,7 @@ CombatGroup::MergeOrderOfBattle(BYTE* block, const char* filename, int team, Com do { delete term; term = 0; term = parser.ParseTerm(); - + if (term) { TermDef* def = term->isDef(); if (def) { @@ -1293,7 +1293,7 @@ CombatGroup::MergeOrderOfBattle(BYTE* block, const char* filename, int team, Com int unit_damage = 0; int unit_heading= 0; int unit_index = 0; - + *name = 0; *type = 0; *intel = 0; @@ -1309,7 +1309,7 @@ CombatGroup::MergeOrderOfBattle(BYTE* block, const char* filename, int team, Com // all groups in this OOB default to the IFF of the main force if (force) iff = force->GetIFF(); - + for (int i = 0; i < val->elements()->size(); i++) { TermDef* pdef = val->elements()->at(i)->isDef(); if (pdef && (iff < 0 || team < 0 || iff == team)) { @@ -1342,7 +1342,7 @@ CombatGroup::MergeOrderOfBattle(BYTE* block, const char* filename, int team, Com ZeroMemory(unit_region, sizeof(unit_region)); ZeroMemory(design, sizeof(design)); - + for (int i = 0; i < val->elements()->size(); i++) { TermDef* pdef = val->elements()->at(i)->isDef(); if (pdef) { @@ -1410,7 +1410,7 @@ CombatGroup::MergeOrderOfBattle(BYTE* block, const char* filename, int team, Com if (!force) continue; - // if we already have a force, and we find a second one, + // if we already have a force, and we find a second one, // it must be the start of a different combatant. // So don't process any further: if (TypeFromName(type) == CombatGroup::FORCE) { @@ -1541,8 +1541,8 @@ SaveCombatUnit(FILE* f, CombatUnit* u) } fprintf(f, " dead_count: %d, damage: %d, heading: %d },", - (int) u->DeadCount(), - (int) u->GetSustainedDamage(), + (int) u->DeadCount(), + (int) u->GetSustainedDamage(), (int) (u->GetHeading() / DEGREES)); } -- cgit v1.1