Skip to content

Commit

Permalink
Remove duplicate code
Browse files Browse the repository at this point in the history
Same code is a few lines above.
  • Loading branch information
KJeff01 committed Apr 20, 2024
1 parent d04f77d commit ef2fb5c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,6 @@ void structureBuild(STRUCTURE *psStruct, DROID *psDroid, int buildPoints, int bu
addPower(psStruct->player, structureTotalReturn(psStruct));
}

ASSERT(newBuildPoints <= 1 + 3 * (int)structureBuildPointsToCompletion(*psStruct), "unsigned int underflow?");
CLIP(newBuildPoints, 0, structureBuildPointsToCompletion(*psStruct));

int deltaBody = quantiseFraction(9 * psStruct->structureBody(), 10 * structureBuildPointsToCompletion(*psStruct), newBuildPoints, psStruct->currentBuildPts);
psStruct->currentBuildPts = newBuildPoints;
psStruct->body = std::max<int>(psStruct->body + deltaBody, 1);
Expand Down

0 comments on commit ef2fb5c

Please sign in to comment.