diff --git a/src/blitter/32bpp_sse_func.hpp b/src/blitter/32bpp_sse_func.hpp index 69d951cd26..fb0ce9eb6e 100644 --- a/src/blitter/32bpp_sse_func.hpp +++ b/src/blitter/32bpp_sse_func.hpp @@ -159,7 +159,7 @@ static inline __m128i AdjustBrightnessOfTwoPixels(__m128i from, uint32 brightnes __m128i briAB = _mm_cvtsi32_si128(brightness); briAB = _mm_shuffle_epi8(briAB, BRIGHTNESS_LOW_CONTROL_MASK); // DEFAULT_BRIGHTNESS in 0, 0x00 in 2. colAB = _mm_mullo_epi16(colAB, briAB); - __m128i colAB_ob = _mm_srli_epi16(colAB, 8+7); + __m128i colAB_ob = _mm_srli_epi16(colAB, 8 + 7); colAB = _mm_srli_epi16(colAB, 7); /* Sum overbright. diff --git a/src/fontcache.cpp b/src/fontcache.cpp index 8aae4d7839..a655856274 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -196,7 +196,7 @@ bool SpriteFontCache::GetDrawGlyphShadow() return false; } -/*static */ FontCache *FontCache::caches[FS_END] = { new SpriteFontCache(FS_NORMAL), new SpriteFontCache(FS_SMALL), new SpriteFontCache(FS_LARGE), new SpriteFontCache(FS_MONO) }; +/* static */ FontCache *FontCache::caches[FS_END] = { new SpriteFontCache(FS_NORMAL), new SpriteFontCache(FS_SMALL), new SpriteFontCache(FS_LARGE), new SpriteFontCache(FS_MONO) }; #ifdef WITH_FREETYPE #include diff --git a/src/linkgraph/mcf.cpp b/src/linkgraph/mcf.cpp index 81d4d6d38e..bd3794a63a 100644 --- a/src/linkgraph/mcf.cpp +++ b/src/linkgraph/mcf.cpp @@ -311,7 +311,7 @@ void MultiCommodityFlow::CleanupPaths(NodeID source_id, PathVector &paths) * @param path End of the path the flow should be pushed on. * @param accuracy Accuracy of the calculation. * @param max_saturation If < UINT_MAX only push flow up to the given - * saturation, otherwise the path can be "overloaded". + * saturation, otherwise the path can be "overloaded". */ uint MultiCommodityFlow::PushFlow(Edge &edge, Path *path, uint accuracy, uint max_saturation) diff --git a/src/linkgraph/refresh.h b/src/linkgraph/refresh.h index 7c221bc224..496729df7f 100644 --- a/src/linkgraph/refresh.h +++ b/src/linkgraph/refresh.h @@ -101,4 +101,4 @@ protected: void RefreshLinks(const Order *cur, const Order *next, uint8 flags, uint num_hops = 0); }; -#endif // REFRESH_H +#endif /* REFRESH_H */ diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 326af65d79..d4d294146e 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -210,7 +210,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res) * when that's the case handle it appropriately. * @return true when everything went okay. */ -/*static */ bool ClientNetworkGameSocketHandler::Receive() +/* static */ bool ClientNetworkGameSocketHandler::Receive() { if (my_client->CanSendReceive()) { NetworkRecvStatus res = my_client->ReceivePackets(); @@ -225,7 +225,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res) } /** Send the packets of this socket handler. */ -/*static */ void ClientNetworkGameSocketHandler::Send() +/* static */ void ClientNetworkGameSocketHandler::Send() { my_client->SendPackets(); my_client->CheckConnection(); diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index d16b34ddc6..2046d004b1 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2122,7 +2122,7 @@ bool AfterLoadGame() /* Delete small ufos heading for non-existing vehicles */ Vehicle *v; FOR_ALL_DISASTERVEHICLES(v) { - if (v->subtype == 2/*ST_SMALL_UFO*/ && v->current_order.GetDestination() != 0) { + if (v->subtype == 2 /* ST_SMALL_UFO */ && v->current_order.GetDestination() != 0) { const Vehicle *u = Vehicle::GetIfValid(v->dest_tile); if (u == NULL || u->type != VEH_ROAD || !RoadVehicle::From(u)->IsFrontEngine()) { delete v; diff --git a/src/script/api/script_event_types.cpp b/src/script/api/script_event_types.cpp index 9a561093a0..d424e6feff 100644 --- a/src/script/api/script_event_types.cpp +++ b/src/script/api/script_event_types.cpp @@ -259,10 +259,10 @@ char *ScriptEventAdminPort::ReadValue(HSQUIRRELVM vm, char *p) sq_newarray(vm, 0); /* Empty array? */ - char *p2 = p+1; + char *p2 = p + 1; SKIP_EMPTY(p2); if (*p2 == ']') { - p = p2+1; + p = p2 + 1; break; } diff --git a/src/script/api/script_station.cpp b/src/script/api/script_station.cpp index 197e97c745..5ed43e0a67 100644 --- a/src/script/api/script_station.cpp +++ b/src/script/api/script_station.cpp @@ -230,7 +230,7 @@ template return ::Station::Get(station_id)->town->index; } -/*static */ bool ScriptStation::IsAirportClosed(StationID station_id) +/* static */ bool ScriptStation::IsAirportClosed(StationID station_id) { EnforcePrecondition(false, IsValidStation(station_id)); EnforcePrecondition(false, HasStationType(station_id, STATION_AIRPORT)); @@ -238,7 +238,7 @@ template return (::Station::Get(station_id)->airport.flags & AIRPORT_CLOSED_block) != 0; } -/*static */ bool ScriptStation::OpenCloseAirport(StationID station_id) +/* static */ bool ScriptStation::OpenCloseAirport(StationID station_id) { EnforcePrecondition(false, IsValidStation(station_id)); EnforcePrecondition(false, HasStationType(station_id, STATION_AIRPORT)); diff --git a/src/script/api/script_stationlist.cpp b/src/script/api/script_stationlist.cpp index 7467c1a346..ab9503a1b5 100644 --- a/src/script/api/script_stationlist.cpp +++ b/src/script/api/script_stationlist.cpp @@ -41,7 +41,7 @@ ScriptStationList_Cargo::ScriptStationList_Cargo(ScriptStationList_Cargo::CargoM ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station) { - switch(mode) { + switch (mode) { case CM_WAITING: ScriptStationList_CargoWaiting(selector, station_id, cargo, other_station).SwapList(this); break; @@ -57,7 +57,7 @@ ScriptStationList_CargoWaiting::ScriptStationList_CargoWaiting( ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station) { - switch(selector) { + switch (selector) { case CS_BY_FROM: ScriptStationList_CargoWaitingByFrom(station_id, cargo).SwapList(this); break; @@ -79,7 +79,7 @@ ScriptStationList_CargoPlanned::ScriptStationList_CargoPlanned( ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station) { - switch(selector) { + switch (selector) { case CS_BY_FROM: ScriptStationList_CargoPlannedByFrom(station_id, cargo).SwapList(this); break; diff --git a/src/story_gui.cpp b/src/story_gui.cpp index 8199e7fcc4..1c0edd9257 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -568,10 +568,10 @@ public: if (widget != WID_SB_SEL_PAGE && widget != WID_SB_PAGE_PANEL) return; Dimension d; - d.height= FONT_HEIGHT_NORMAL; + d.height = FONT_HEIGHT_NORMAL; d.width = 0; - switch(widget) { + switch (widget) { case WID_SB_SEL_PAGE: { /* Get max title width. */ diff --git a/src/string.cpp b/src/string.cpp index 87ea26ee7e..6bc9319c1c 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -644,7 +644,7 @@ public: size_t idx = s - string_base; WChar c = Utf8Consume(&s); - if (c < 0x10000) { + if (c < 0x10000) { *this->utf16_str.Append() = (UChar)c; } else { /* Make a surrogate pair. */ diff --git a/src/table/sprites.h b/src/table/sprites.h index fa687a39fc..81d5388f99 100644 --- a/src/table/sprites.h +++ b/src/table/sprites.h @@ -999,10 +999,10 @@ static const SpriteID SPR_CNST1_TOWNHOUSE_06_V1 = 1444; static const SpriteID SPR_CNST2_TOWNHOUSE_06_V1 = 1445; static const SpriteID SPR_BUILD_TOWNHOUSE_06_V1 = 1446; // 1st variation static const SpriteID SPR_GRND_TOWNHOUSE_06_V1 = 1447; -static const SpriteID SPR_GRND_STADIUM_N = 1479; //stadium ground at north -static const SpriteID SPR_GRND_STADIUM_E = 1480; //stadium ground at east -static const SpriteID SPR_GRND_STADIUM_W = 1481; //stadium ground at west -static const SpriteID SPR_GRND_STADIUM_S = 1482; //stadium ground at south +static const SpriteID SPR_GRND_STADIUM_N = 1479; // stadium ground at north +static const SpriteID SPR_GRND_STADIUM_E = 1480; // stadium ground at east +static const SpriteID SPR_GRND_STADIUM_W = 1481; // stadium ground at west +static const SpriteID SPR_GRND_STADIUM_S = 1482; // stadium ground at south static const SpriteID SPR_CNST1_TOWNHOUSE_06_V2 = 1501; // used as ground, but is stage1 static const SpriteID SPR_CNST1_TOWNHOUSE_06_V2_P = 1502; // pipes extensions for previous static const SpriteID SPR_CNST2_TOWNHOUSE_06_V2_G = 1503; // Ground of cnst stage 2 diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 8c86475ef6..76a6b36f4e 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -171,7 +171,7 @@ Money HouseSpec::GetRemovalCost() const return (_price[PR_CLEAR_HOUSE] * this->removal_cost) >> 8; } -// Local +/* Local */ static int _grow_town_result; /* Describe the possible states */ diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index a31b9272d4..cb9238eb2e 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1439,7 +1439,7 @@ void Train::UpdateDeltaXY(Direction direction) if (!IsDiagonalDirection(direction)) { static const int _sign_table[] = { - // x, y + /* x, y */ -1, -1, // DIR_N -1, 1, // DIR_E 1, 1, // DIR_S diff --git a/src/viewport.cpp b/src/viewport.cpp index 7757d504e1..06c0dbe8ef 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -250,8 +250,8 @@ void InitializeWindowViewport(Window *w, int x, int y, vp->overlay = NULL; w->viewport = vp; - vp->virtual_left = 0;//pt.x; - vp->virtual_top = 0;//pt.y; + vp->virtual_left = 0; // pt.x; + vp->virtual_top = 0; // pt.y; } static Point _vp_move_offs; diff --git a/src/widgets/sign_widget.h b/src/widgets/sign_widget.h index 676e6741b1..f390793ceb 100644 --- a/src/widgets/sign_widget.h +++ b/src/widgets/sign_widget.h @@ -34,4 +34,4 @@ enum QueryEditSignWidgets { WID_QES_NEXT, ///< Next button. }; -#endif /* */ +#endif /* SIGN_WIDGET_H */