(svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces)

This commit is contained in:
rubidium 2014-10-15 18:31:37 +00:00
parent 155114aa98
commit d534c80e94
16 changed files with 26 additions and 26 deletions

View File

@ -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.

View File

@ -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 <ft2build.h>

View File

@ -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)

View File

@ -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 */

View File

@ -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();

View File

@ -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;

View File

@ -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;
}

View File

@ -230,7 +230,7 @@ template<bool Tfrom, bool Tvia>
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<bool Tfrom, bool Tvia>
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));

View File

@ -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;

View File

@ -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. */

View File

@ -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. */

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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;

View File

@ -34,4 +34,4 @@ enum QueryEditSignWidgets {
WID_QES_NEXT, ///< Next button.
};
#endif /* */
#endif /* SIGN_WIDGET_H */