mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 11:44:17 +01:00
Codechange: Space between template and < (#13278)
Make it all consistent so it matches CODINGSTYLE.
This commit is contained in:
@@ -43,7 +43,7 @@ private:
|
||||
int modifications; ///< Number of modification that has been done. To prevent changing data while valuating.
|
||||
|
||||
protected:
|
||||
template<typename T, class ItemValid, class ItemFilter>
|
||||
template <typename T, class ItemValid, class ItemFilter>
|
||||
static void FillList(ScriptList *list, ItemValid item_valid, ItemFilter item_filter)
|
||||
{
|
||||
for (const T *item : T::Iterate()) {
|
||||
@@ -53,19 +53,19 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T, class ItemValid>
|
||||
template <typename T, class ItemValid>
|
||||
static void FillList(ScriptList *list, ItemValid item_valid)
|
||||
{
|
||||
ScriptList::FillList<T>(list, item_valid, [](const T *) { return true; });
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
static void FillList(ScriptList *list)
|
||||
{
|
||||
ScriptList::FillList<T>(list, [](const T *) { return true; });
|
||||
}
|
||||
|
||||
template<typename T, class ItemValid>
|
||||
template <typename T, class ItemValid>
|
||||
static void FillList(HSQUIRRELVM vm, ScriptList *list, ItemValid item_valid)
|
||||
{
|
||||
int nparam = sq_gettop(vm) - 1;
|
||||
@@ -137,7 +137,7 @@ protected:
|
||||
ScriptObject::SetAllowDoCommand(backup_allow);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
static void FillList(HSQUIRRELVM vm, ScriptList *list)
|
||||
{
|
||||
ScriptList::FillList<T>(vm, list, [](const T *) { return true; });
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
static void InitializeRandomizers();
|
||||
|
||||
protected:
|
||||
template<Commands TCmd, typename T> struct ScriptDoCommandHelper;
|
||||
template <Commands TCmd, typename T> struct ScriptDoCommandHelper;
|
||||
|
||||
/**
|
||||
* Templated wrapper that exposes the command parameter arguments
|
||||
@@ -346,7 +346,7 @@ namespace ScriptObjectInternal {
|
||||
}
|
||||
|
||||
/** Helper function to perform validation on command data strings. */
|
||||
template<class Ttuple, size_t... Tindices>
|
||||
template <class Ttuple, size_t... Tindices>
|
||||
static inline void SanitizeStringsHelper(Ttuple &values, std::index_sequence<Tindices...>)
|
||||
{
|
||||
((SanitizeSingleStringHelper(std::get<Tindices>(values))), ...);
|
||||
@@ -362,7 +362,7 @@ namespace ScriptObjectInternal {
|
||||
}
|
||||
|
||||
/** Set all invalid ClientID's to the proper value. */
|
||||
template<class Ttuple, size_t... Tindices>
|
||||
template <class Ttuple, size_t... Tindices>
|
||||
static inline void SetClientIds(Ttuple &values, std::index_sequence<Tindices...>)
|
||||
{
|
||||
((SetClientIdHelper(std::get<Tindices>(values))), ...);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
return ::GetStationIndex(tile);
|
||||
}
|
||||
|
||||
template<bool Tfrom, bool Tvia>
|
||||
template <bool Tfrom, bool Tvia>
|
||||
/* static */ bool ScriptStation::IsCargoRequestValid(StationID station_id,
|
||||
StationID from_station_id, StationID via_station_id, CargoID cargo_id)
|
||||
{
|
||||
@@ -50,7 +50,7 @@ template<bool Tfrom, bool Tvia>
|
||||
return true;
|
||||
}
|
||||
|
||||
template<bool Tfrom, bool Tvia>
|
||||
template <bool Tfrom, bool Tvia>
|
||||
/* static */ SQInteger ScriptStation::CountCargoWaiting(StationID station_id,
|
||||
StationID from_station_id, StationID via_station_id, CargoID cargo_id)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ template<bool Tfrom, bool Tvia>
|
||||
return CountCargoWaiting<true, true>(station_id, from_station_id, via_station_id, cargo_id);
|
||||
}
|
||||
|
||||
template<bool Tfrom, bool Tvia>
|
||||
template <bool Tfrom, bool Tvia>
|
||||
/* static */ SQInteger ScriptStation::CountCargoPlanned(StationID station_id,
|
||||
StationID from_station_id, StationID via_station_id, CargoID cargo_id)
|
||||
{
|
||||
|
||||
@@ -297,15 +297,15 @@ public:
|
||||
static bool OpenCloseAirport(StationID station_id);
|
||||
|
||||
private:
|
||||
template<bool Tfrom, bool Tvia>
|
||||
template <bool Tfrom, bool Tvia>
|
||||
static bool IsCargoRequestValid(StationID station_id, StationID from_station_id,
|
||||
StationID via_station_id, CargoID cargo_id);
|
||||
|
||||
template<bool Tfrom, bool Tvia>
|
||||
template <bool Tfrom, bool Tvia>
|
||||
static SQInteger CountCargoWaiting(StationID station_id, StationID from_station_id,
|
||||
StationID via_station_id, CargoID cargo_id);
|
||||
|
||||
template<bool Tfrom, bool Tvia>
|
||||
template <bool Tfrom, bool Tvia>
|
||||
static SQInteger CountCargoPlanned(StationID station_id, StationID from_station_id,
|
||||
StationID via_station_id, CargoID cargo_id);
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
StationID other);
|
||||
~CargoCollector() ;
|
||||
|
||||
template<ScriptStationList_Cargo::CargoSelector Tselector>
|
||||
template <ScriptStationList_Cargo::CargoSelector Tselector>
|
||||
void Update(StationID from, StationID via, uint amount);
|
||||
const GoodsEntry *GE() const { return ge; }
|
||||
|
||||
@@ -146,7 +146,7 @@ void CargoCollector::SetValue()
|
||||
}
|
||||
}
|
||||
|
||||
template<ScriptStationList_Cargo::CargoSelector Tselector>
|
||||
template <ScriptStationList_Cargo::CargoSelector Tselector>
|
||||
void CargoCollector::Update(StationID from, StationID via, uint amount)
|
||||
{
|
||||
StationID key = INVALID_STATION;
|
||||
@@ -174,7 +174,7 @@ void CargoCollector::Update(StationID from, StationID via, uint amount)
|
||||
}
|
||||
|
||||
|
||||
template<ScriptStationList_Cargo::CargoSelector Tselector>
|
||||
template <ScriptStationList_Cargo::CargoSelector Tselector>
|
||||
void ScriptStationList_CargoWaiting::Add(StationID station_id, CargoID cargo, StationID other_station)
|
||||
{
|
||||
CargoCollector collector(this, station_id, cargo, other_station);
|
||||
@@ -189,7 +189,7 @@ void ScriptStationList_CargoWaiting::Add(StationID station_id, CargoID cargo, St
|
||||
}
|
||||
|
||||
|
||||
template<ScriptStationList_Cargo::CargoSelector Tselector>
|
||||
template <ScriptStationList_Cargo::CargoSelector Tselector>
|
||||
void ScriptStationList_CargoPlanned::Add(StationID station_id, CargoID cargo, StationID other_station)
|
||||
{
|
||||
CargoCollector collector(this, station_id, cargo, other_station);
|
||||
|
||||
@@ -92,7 +92,7 @@ protected:
|
||||
* @param cargo Cargo type to query for.
|
||||
* @param other_station Other station to restrict the query with.
|
||||
*/
|
||||
template<CargoSelector Tselector>
|
||||
template <CargoSelector Tselector>
|
||||
void Add(StationID station_id, CargoID cargo, StationID other_station = INVALID_STATION);
|
||||
|
||||
public:
|
||||
@@ -129,7 +129,7 @@ protected:
|
||||
* @param cargo Cargo type to query for.
|
||||
* @param other_station Other station to restrict the query with.
|
||||
*/
|
||||
template<CargoSelector Tselector>
|
||||
template <CargoSelector Tselector>
|
||||
void Add(StationID station_id, CargoID cargo, StationID other_station = INVALID_STATION);
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user