mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Apply coding style (#8640)
* Fix: Missing or needed spaces * Codechange: Remove space * Codechange: Remove space * Codechange: More missing spaces * Codechange: Missing spaces * Codechange: Remove space * Codechange: Remove spacepull/8644/head
parent
5b3fe4ae27
commit
a4035af337
|
@ -1255,7 +1255,7 @@ DEF_CONSOLE_CMD(ConReloadAI)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* First kill the company of the AI, then start a new one. This should start the current AI again */
|
/* First kill the company of the AI, then start a new one. This should start the current AI again */
|
||||||
DoCommandP(0, CCA_DELETE | company_id << 16 | CRR_MANUAL << 24, 0,CMD_COMPANY_CTRL);
|
DoCommandP(0, CCA_DELETE | company_id << 16 | CRR_MANUAL << 24, 0, CMD_COMPANY_CTRL);
|
||||||
DoCommandP(0, CCA_NEW_AI | company_id << 16, 0, CMD_COMPANY_CTRL);
|
DoCommandP(0, CCA_NEW_AI | company_id << 16, 0, CMD_COMPANY_CTRL);
|
||||||
IConsolePrint(CC_DEFAULT, "AI reloaded.");
|
IConsolePrint(CC_DEFAULT, "AI reloaded.");
|
||||||
|
|
||||||
|
@ -2136,7 +2136,7 @@ static void ConDumpRoadTypes()
|
||||||
grfs.emplace(grfid, grf);
|
grfs.emplace(grfid, grf);
|
||||||
}
|
}
|
||||||
IConsolePrintF(CC_DEFAULT, " %02u %s %c%c%c%c, Flags: %c%c%c%c%c, GRF: %08X, %s",
|
IConsolePrintF(CC_DEFAULT, " %02u %s %c%c%c%c, Flags: %c%c%c%c%c, GRF: %08X, %s",
|
||||||
(uint) rt,
|
(uint)rt,
|
||||||
RoadTypeIsTram(rt) ? "Tram" : "Road",
|
RoadTypeIsTram(rt) ? "Tram" : "Road",
|
||||||
rti->label >> 24, rti->label >> 16, rti->label >> 8, rti->label,
|
rti->label >> 24, rti->label >> 16, rti->label >> 8, rti->label,
|
||||||
HasBit(rti->flags, ROTF_CATENARY) ? 'c' : '-',
|
HasBit(rti->flags, ROTF_CATENARY) ? 'c' : '-',
|
||||||
|
@ -2174,7 +2174,7 @@ static void ConDumpRailTypes()
|
||||||
grfs.emplace(grfid, grf);
|
grfs.emplace(grfid, grf);
|
||||||
}
|
}
|
||||||
IConsolePrintF(CC_DEFAULT, " %02u %c%c%c%c, Flags: %c%c%c%c%c%c, GRF: %08X, %s",
|
IConsolePrintF(CC_DEFAULT, " %02u %c%c%c%c, Flags: %c%c%c%c%c%c, GRF: %08X, %s",
|
||||||
(uint) rt,
|
(uint)rt,
|
||||||
rti->label >> 24, rti->label >> 16, rti->label >> 8, rti->label,
|
rti->label >> 24, rti->label >> 16, rti->label >> 8, rti->label,
|
||||||
HasBit(rti->flags, RTF_CATENARY) ? 'c' : '-',
|
HasBit(rti->flags, RTF_CATENARY) ? 'c' : '-',
|
||||||
HasBit(rti->flags, RTF_NO_LEVEL_CROSSING) ? 'l' : '-',
|
HasBit(rti->flags, RTF_NO_LEVEL_CROSSING) ? 'l' : '-',
|
||||||
|
@ -2217,7 +2217,7 @@ static void ConDumpCargoTypes()
|
||||||
grfs.emplace(grfid, grf);
|
grfs.emplace(grfid, grf);
|
||||||
}
|
}
|
||||||
IConsolePrintF(CC_DEFAULT, " %02u Bit: %2u, Label: %c%c%c%c, Callback mask: 0x%02X, Cargo class: %c%c%c%c%c%c%c%c%c%c%c, GRF: %08X, %s",
|
IConsolePrintF(CC_DEFAULT, " %02u Bit: %2u, Label: %c%c%c%c, Callback mask: 0x%02X, Cargo class: %c%c%c%c%c%c%c%c%c%c%c, GRF: %08X, %s",
|
||||||
(uint) i,
|
(uint)i,
|
||||||
spec->bitnum,
|
spec->bitnum,
|
||||||
spec->label >> 24, spec->label >> 16, spec->label >> 8, spec->label,
|
spec->label >> 24, spec->label >> 16, spec->label >> 8, spec->label,
|
||||||
spec->callback_mask,
|
spec->callback_mask,
|
||||||
|
|
|
@ -741,8 +741,8 @@ public:
|
||||||
assert(vehgroup.NumVehicles() > 0);
|
assert(vehgroup.NumVehicles() > 0);
|
||||||
v = vehgroup.vehicles_begin[0];
|
v = vehgroup.vehicles_begin[0];
|
||||||
/*
|
/*
|
||||||
No VehicleClicked(v) support for now, because don't want
|
* No VehicleClicked(v) support for now, because don't want
|
||||||
to enable any contextual actions except perhaps clicking/ctrl-clicking to clone orders.
|
* to enable any contextual actions except perhaps clicking/ctrl-clicking to clone orders.
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,7 +332,7 @@ protected:
|
||||||
if (r == 0) r = a->info.use_password - b->info.use_password;
|
if (r == 0) r = a->info.use_password - b->info.use_password;
|
||||||
|
|
||||||
/* Finally sort on the number of clients of the server in reverse order. */
|
/* Finally sort on the number of clients of the server in reverse order. */
|
||||||
return (r != 0) ? r < 0: !NGameClientSorter(a, b);
|
return (r != 0) ? r < 0 : !NGameClientSorter(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sort the server list */
|
/** Sort the server list */
|
||||||
|
|
|
@ -4083,7 +4083,7 @@ uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, Sourc
|
||||||
|
|
||||||
/* If there is some cargo left due to rounding issues distribute it among the best rated stations. */
|
/* If there is some cargo left due to rounding issues distribute it among the best rated stations. */
|
||||||
if (amount > moving) {
|
if (amount > moving) {
|
||||||
std::sort(used_stations.begin(), used_stations.end(), [type] (const StationInfo &a, const StationInfo &b) {
|
std::sort(used_stations.begin(), used_stations.end(), [type](const StationInfo &a, const StationInfo &b) {
|
||||||
return b.first->goods[type].rating < a.first->goods[type].rating;
|
return b.first->goods[type].rating < a.first->goods[type].rating;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1117,7 +1117,7 @@ static bool GrowTownWithRoad(const Town *t, TileIndex tile, RoadBits rcmd)
|
||||||
* @param road_dir The direction of the road
|
* @param road_dir The direction of the road
|
||||||
* @return true if the road can be continued, else false
|
* @return true if the road can be continued, else false
|
||||||
*/
|
*/
|
||||||
static bool CanRoadContinueIntoNextTile(const Town* t, const TileIndex tile, const DiagDirection road_dir)
|
static bool CanRoadContinueIntoNextTile(const Town *t, const TileIndex tile, const DiagDirection road_dir)
|
||||||
{
|
{
|
||||||
const int delta = TileOffsByDiagDir(road_dir); // +1 tile in the direction of the road
|
const int delta = TileOffsByDiagDir(road_dir); // +1 tile in the direction of the road
|
||||||
TileIndex next_tile = tile + delta; // The tile beyond which must be connectable to the target tile
|
TileIndex next_tile = tile + delta; // The tile beyond which must be connectable to the target tile
|
||||||
|
@ -1236,7 +1236,7 @@ static bool GrowTownWithBridge(const Town *t, const TileIndex tile, const DiagDi
|
||||||
* @param tunnel_dir The valid direction in which to grow a tunnel
|
* @param tunnel_dir The valid direction in which to grow a tunnel
|
||||||
* @return true if a tunnel has been built, else false
|
* @return true if a tunnel has been built, else false
|
||||||
*/
|
*/
|
||||||
static bool GrowTownWithTunnel(const Town* t, const TileIndex tile, const DiagDirection tunnel_dir)
|
static bool GrowTownWithTunnel(const Town *t, const TileIndex tile, const DiagDirection tunnel_dir)
|
||||||
{
|
{
|
||||||
assert(tunnel_dir < DIAGDIR_END);
|
assert(tunnel_dir < DIAGDIR_END);
|
||||||
|
|
||||||
|
|
|
@ -1575,7 +1575,6 @@ void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int
|
||||||
}
|
}
|
||||||
|
|
||||||
case GB_SHARED_ORDERS:
|
case GB_SHARED_ORDERS:
|
||||||
|
|
||||||
assert(vehgroup.NumVehicles() > 0);
|
assert(vehgroup.NumVehicles() > 0);
|
||||||
|
|
||||||
for (int i = 0; i < static_cast<int>(vehgroup.NumVehicles()); ++i) {
|
for (int i = 0; i < static_cast<int>(vehgroup.NumVehicles()); ++i) {
|
||||||
|
|
|
@ -524,7 +524,7 @@ static uint ConvertSdlKeycodeIntoMy(SDL_Keycode kc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check scancode for BACKQUOTE key, because we want the key left
|
/* check scancode for BACKQUOTE key, because we want the key left
|
||||||
of "1", not anything else (on non-US keyboards) */
|
* of "1", not anything else (on non-US keyboards) */
|
||||||
SDL_Scancode sc = SDL_GetScancodeFromKey(kc);
|
SDL_Scancode sc = SDL_GetScancodeFromKey(kc);
|
||||||
if (sc == SDL_SCANCODE_GRAVE) key = WKC_BACKQUOTE;
|
if (sc == SDL_SCANCODE_GRAVE) key = WKC_BACKQUOTE;
|
||||||
|
|
||||||
|
|
|
@ -1527,7 +1527,7 @@ static void ViewportSortParentSprites(ParentSpriteToSortVector *psdv)
|
||||||
|
|
||||||
sprite_list.sort();
|
sprite_list.sort();
|
||||||
|
|
||||||
std::vector<ParentSpriteToDraw*> preceding; // Temporarily stores sprites that precede current and their position in the list
|
std::vector<ParentSpriteToDraw *> preceding; // Temporarily stores sprites that precede current and their position in the list
|
||||||
auto preceding_prev = sprite_list.begin(); // Store iterator in case we need to delete a single preciding sprite
|
auto preceding_prev = sprite_list.begin(); // Store iterator in case we need to delete a single preciding sprite
|
||||||
auto out = psdv->begin(); // Iterator to output sorted sprites
|
auto out = psdv->begin(); // Iterator to output sorted sprites
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ void ViewportSortParentSpritesSSE41(ParentSpriteToSortVector *psdv)
|
||||||
|
|
||||||
sprite_list.sort();
|
sprite_list.sort();
|
||||||
|
|
||||||
std::vector<ParentSpriteToDraw*> preceding; // Temporarily stores sprites that precede current and their position in the list
|
std::vector<ParentSpriteToDraw *> preceding; // Temporarily stores sprites that precede current and their position in the list
|
||||||
auto preceding_prev = sprite_list.begin(); // Store iterator in case we need to delete a single preciding sprite
|
auto preceding_prev = sprite_list.begin(); // Store iterator in case we need to delete a single preciding sprite
|
||||||
auto out = psdv->begin(); // Iterator to output sorted sprites
|
auto out = psdv->begin(); // Iterator to output sorted sprites
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue