* fixed compilation due to broken sed statement

This commit is contained in:
Martin Gerhardy 2010-11-12 08:43:12 +01:00
parent 2f60fd9e8a
commit 93f0d982c9
10 changed files with 22 additions and 23 deletions

View file

@ -929,7 +929,7 @@ void HandleActionResource(CUnit &unit)
if (unit.SubAction == SUB_STOP_GATHERING) {
if (StopGathering(unit)) {
unit.SubAction = SUB_MOVE_TO_DEPOT;
unit.Data.Move.Cycles = 0 //moving counter
unit.Data.Move.Cycles = 0; //moving counter
} else
return;
}

View file

@ -215,7 +215,7 @@ static int AiFindBuildingPlace2(const CUnit &worker, const CUnitType *type,
//
// Pop a point from stack, push all neighbours which could be entered.
//
for () {
for (;;) {
while (rp != ep) {
rpos = points[rp];
for (i = 0; i < 8; ++i) { // mark all neighbors
@ -338,7 +338,7 @@ static int AiFindHallPlace(const CUnit &worker,
//
// Pop a point from stack, push all neighbors which could be entered.
//
for () {
for (;;) {
while (rp != ep) {
rpos = points[rp];
for (i = 0; i < 8; ++i) { // mark all neighbors
@ -483,7 +483,7 @@ static int AiFindLumberMillPlace(const CUnit &worker, const CUnitType *type,
//
// Pop a point from stack, push all neightbors which could be entered.
//
for () {
for (;;) {
while (rp != ep) {
rpos = points[rp];
for (i = 0; i < 8; ++i) { // mark all neighbors
@ -578,7 +578,7 @@ static int AiFindMiningPlace(const CUnit &worker,
//
// Pop a point from stack, push all neighbors which could be entered.
//
for () {
for (;;) {
while (rp != ep) {
rpos = points[rp];
for (i = 0; i < 8; ++i) { // mark all neighbors

View file

@ -162,7 +162,7 @@ static void AiMarkWaterTransporter(const CUnit &unit, unsigned char *matrix)
//
// Pop a point from stack, push all neightbors which could be entered.
//
for () {
for (;;) {
while (rp != ep) {
rx = points[rp].X;
ry = points[rp].Y;
@ -260,7 +260,7 @@ static bool AiFindTarget(const CUnit &unit,
//
// Pop a point from stack, push all neightbors which could be entered.
//
for () {
for (;;) {
while (rp != ep) {
rpos = points[rp].pos;
state = points[rp].State;

View file

@ -262,7 +262,7 @@ static void LuaLoadBuffer(const std::string &file, std::string &buffer)
ExitFatal(-1);
}
location = 0;
for () {
for (;;) {
read = fp.read(&buf[location], size - location);
if (read != size - location) {
location += read;

View file

@ -761,7 +761,7 @@ static int CclGetPlayerData(lua_State *l)
} else if (!strcmp(data, "Resources")) {
LuaCheckArgs(l, 3);
const std::string res = LuaToString(l, 3)
const std::string res = LuaToString(l, 3);
unsigned int i;
for (i = 0; i < MaxCosts; ++i) {

View file

@ -847,7 +847,7 @@ int main(int argc, char **argv)
//
// Parse commandline
//
for () {
for (;;) {
#ifdef USE_MAEMO
switch (getopt(argc, argv, "c:d:ef:hln:I:P:s:t:v:wD:N:E:S:U:OL:o?")) {
#else

View file

@ -1762,7 +1762,7 @@ static int CclDefineDecorations(lua_State *l)
} else if (!strcmp(key, "Width")) {
decovarbar->Width = LuaToNumber(l, -1);
} else if (!strcmp(key, "Orientation")) {
key = LuaToString(l, -1)
key = LuaToString(l, -1);
if (!strcmp(key, "horizontal")) {
decovarbar->IsVertical = 0;
} else if (!strcmp(key, "vertical")) {

View file

@ -1863,7 +1863,7 @@ void DropOutOnSide(CUnit &unit, int heading, int addx, int addy)
goto startw;
// FIXME: don't search outside of the map
for () {
for (;;) {
startw:
for (i = addy; i--; ++pos.y) {
if (UnitCanBeAt(unit, pos.x, pos.y)) {
@ -1922,7 +1922,7 @@ void DropOutNearest(CUnit &unit, const Vec2i &goalPos, int addx, int addy)
// FIXME: if we reach the map borders we can go fast up, left, ...
--pos.x;
for () {
for (;;) {
for (int i = addy; i--; ++pos.y) { // go down
if (UnitCanBeAt(unit, pos.x, pos.y)) {
const int n = MapDistance(goalPos.x, goalPos.y, pos.x, pos.y);
@ -2069,7 +2069,7 @@ int FindTerrainType(int movemask, int resmask, int rvresult, int range,
//
// Pop a point from stack, push all neighbors which could be entered.
//
for () {
for (;;) {
while (rp != ep) {
rpos = points[rp];
for (i = 0; i < 8; ++i) { // mark all neighbors
@ -2317,7 +2317,7 @@ CUnit *UnitFindResource(const CUnit &unit, int x, int y, int range, int resource
//
// Pop a point from stack, push all neighbors which could be entered.
//
for () {
for (;;) {
while (rp != ep) {
rpos = points[rp];
for (i = 0; i < 9; ++i) { // mark all neighbors
@ -2526,7 +2526,7 @@ CUnit *UnitFindMiningArea(const CUnit &unit, int x, int y, int range, int resou
//
// Pop a point from stack, push all neighbors which could be entered.
//
for () {
for (;;) {
while (rp != ep) {
rpos = points[rp];
for (i = 0; i < 9; ++i) { // mark all neighbors
@ -3285,7 +3285,7 @@ int ViewPointDistance(int x, int y)
*/
int ViewPointDistanceToUnit(const CUnit &dest)
{
const CViewport &vp = *UI.SelectedViewport
const CViewport &vp = *UI.SelectedViewport;
return dest.MapDistanceTo(vp.MapX + vp.MapWidth / 2, vp.MapY + vp.MapHeight / 2);
}

View file

@ -873,7 +873,7 @@ void WaitEventsOneFrame()
interrupts = 0;
for () {
for (;;) {
//
// Time of frame over? This makes the CPU happy. :(
//

View file

@ -99,8 +99,8 @@ void DrawTexture(const CGraphic *g, GLuint *textures,
Assert(gx_end <= g->GraphicWidth);
Assert(gy_end <= g->GraphicHeight);
for (int tex_gy_beg = gy_beg / GLMaxTextureSize * GLMaxTextureSize
tex_gy_beg += GLMaxTextureSize) {
for (int tex_gy_beg = gy_beg / GLMaxTextureSize * GLMaxTextureSize;;
tex_gy_beg += GLMaxTextureSize) {
int tex_gy_end = tex_gy_beg + GLMaxTextureSize;
int clip_gy_beg = std::max<int>(gy_beg, tex_gy_beg);
int clip_gy_end = std::min<int>(gy_end, tex_gy_end);
@ -133,9 +133,8 @@ void DrawTexture(const CGraphic *g, GLuint *textures,
Assert(clip_ty_beg < clip_ty_end);
Assert(clip_ty_end <= 1.0f);
for (int tex_gx_beg = gx_beg / GLMaxTextureSize
* GLMaxTextureSize
tex_gx_beg += GLMaxTextureSize) {
for (int tex_gx_beg = gx_beg / GLMaxTextureSize * GLMaxTextureSize;;
tex_gx_beg += GLMaxTextureSize) {
int tex_gx_end = tex_gx_beg + GLMaxTextureSize;
int clip_gx_beg = std::max<int>(gx_beg, tex_gx_beg);
int clip_gx_end = std::min<int>(gx_end, tex_gx_end);