Changeset - r27971:716575a43d7f
src/aircraft.h
Show inline comments
 
@@ -89,28 +89,28 @@ struct Aircraft FINAL : public Specializ
 
	/** We want to 'destruct' the right class. */
 
	virtual ~Aircraft() { this->PreDestructor(); }
 

	
 
	void MarkDirty();
 
	void UpdateDeltaXY();
 
	ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_AIRCRAFT_REVENUE : EXPENSES_AIRCRAFT_RUN; }
 
	bool IsPrimaryVehicle() const                  { return this->IsNormalAircraft(); }
 
	void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const;
 
	int GetDisplaySpeed() const    { return this->cur_speed; }
 
	int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; }
 
	int GetSpeedOldUnits() const   { return this->vcache.cached_max_speed * 10 / 128; }
 
	int GetCurrentMaxSpeed() const { return this->GetSpeedOldUnits(); }
 
	Money GetRunningCost() const;
 
	void MarkDirty() override;
 
	void UpdateDeltaXY() override;
 
	ExpensesType GetExpenseType(bool income) const override { return income ? EXPENSES_AIRCRAFT_REVENUE : EXPENSES_AIRCRAFT_RUN; }
 
	bool IsPrimaryVehicle() const override                  { return this->IsNormalAircraft(); }
 
	void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const override;
 
	int GetDisplaySpeed() const override    { return this->cur_speed; }
 
	int GetDisplayMaxSpeed() const override { return this->vcache.cached_max_speed; }
 
	int GetSpeedOldUnits() const            { return this->vcache.cached_max_speed * 10 / 128; }
 
	int GetCurrentMaxSpeed() const override { return this->GetSpeedOldUnits(); }
 
	Money GetRunningCost() const override;
 

	
 
	bool IsInDepot() const
 
	bool IsInDepot() const override
 
	{
 
		assert(this->IsPrimaryVehicle());
 
		return (this->vehstatus & VS_HIDDEN) != 0 && IsHangarTile(this->tile);
 
	}
 

	
 
	bool Tick();
 
	void OnNewDay();
 
	uint Crash(bool flooded = false);
 
	TileIndex GetOrderStationLocation(StationID station);
 
	ClosestDepot FindClosestDepot();
 
	bool Tick() override;
 
	void OnNewDay() override;
 
	uint Crash(bool flooded = false) override;
 
	TileIndex GetOrderStationLocation(StationID station) override;
 
	ClosestDepot FindClosestDepot() override;
 

	
 
	/**
 
	 * Check if the aircraft type is a normal flying device; eg
src/bitmap_type.h
Show inline comments
 
@@ -116,7 +116,7 @@ public:
 
		if (!this->bitmap->HasTile(TileIndex(this->tile))) ++(*this);
 
	}
 

	
 
	inline TileIterator& operator ++()
 
	inline TileIterator& operator ++() override
 
	{
 
		(*this).OrthogonalTileIterator::operator++();
 
		while (this->tile != INVALID_TILE && !this->bitmap->HasTile(TileIndex(this->tile))) {
 
@@ -125,7 +125,7 @@ public:
 
		return *this;
 
	}
 

	
 
	virtual std::unique_ptr<TileIterator> Clone() const
 
	std::unique_ptr<TileIterator> Clone() const override
 
	{
 
		return std::make_unique<BitmapTileIterator>(*this);
 
	}
src/console_cmds.cpp
Show inline comments
 
@@ -1862,17 +1862,17 @@ static ContentType StringToContentType(c
 

	
 
/** Asynchronous callback */
 
struct ConsoleContentCallback : public ContentCallback {
 
	void OnConnect(bool success)
 
	void OnConnect(bool success) override
 
	{
 
		IConsolePrint(CC_DEFAULT, "Content server connection {}.", success ? "established" : "failed");
 
	}
 

	
 
	void OnDisconnect()
 
	void OnDisconnect() override
 
	{
 
		IConsolePrint(CC_DEFAULT, "Content server connection closed.");
 
	}
 

	
 
	void OnDownloadComplete(ContentID cid)
 
	void OnDownloadComplete(ContentID cid) override
 
	{
 
		IConsolePrint(CC_DEFAULT, "Completed download of {}.", cid);
 
	}
src/core/pool_type.hpp
Show inline comments
 
@@ -97,7 +97,7 @@ struct Pool : PoolBase {
 
	Titem **data;        ///< Pointer to array of pointers to Titem
 

	
 
	Pool(const char *name);
 
	virtual void CleanPool();
 
	void CleanPool() override;
 

	
 
	/**
 
	 * Returns Titem with given index
src/disaster_vehicle.h
Show inline comments
 
@@ -47,9 +47,9 @@ struct DisasterVehicle FINAL : public Sp
 
	virtual ~DisasterVehicle() = default;
 

	
 
	void UpdatePosition(int x, int y, int z);
 
	void UpdateDeltaXY();
 
	void UpdateDeltaXY() override;
 
	void UpdateImage();
 
	bool Tick();
 
	bool Tick() override;
 
};
 

	
 
#endif /* DISASTER_VEHICLE_H */
src/effectvehicle_base.h
Show inline comments
 
@@ -30,8 +30,8 @@ struct EffectVehicle FINAL : public Spec
 
	/** We want to 'destruct' the right class. */
 
	virtual ~EffectVehicle() = default;
 

	
 
	void UpdateDeltaXY();
 
	bool Tick();
 
	void UpdateDeltaXY() override;
 
	bool Tick() override;
 
	TransparencyOption GetTransparencyOption() const;
 
};
 

	
src/game/game_text.cpp
Show inline comments
 
@@ -121,22 +121,22 @@ struct TranslationWriter : LanguageWrite
 
	{
 
	}
 

	
 
	void WriteHeader(const LanguagePackHeader *)
 
	void WriteHeader(const LanguagePackHeader *) override
 
	{
 
		/* We don't use the header. */
 
	}
 

	
 
	void Finalise()
 
	void Finalise() override
 
	{
 
		/* Nothing to do. */
 
	}
 

	
 
	void WriteLength(uint)
 
	void WriteLength(uint) override
 
	{
 
		/* We don't write the length. */
 
	}
 

	
 
	void Write(const byte *buffer, size_t length)
 
	void Write(const byte *buffer, size_t length) override
 
	{
 
		this->strings.emplace_back((const char *)buffer, length);
 
	}
 
@@ -154,12 +154,12 @@ struct StringNameWriter : HeaderWriter {
 
	{
 
	}
 

	
 
	void WriteStringID(const std::string &name, int stringid)
 
	void WriteStringID(const std::string &name, int stringid) override
 
	{
 
		if (stringid == (int)this->strings.size()) this->strings.emplace_back(name);
 
	}
 

	
 
	void Finalise(const StringData &)
 
	void Finalise(const StringData &) override
 
	{
 
		/* Nothing to do. */
 
	}
src/ini_type.h
Show inline comments
 
@@ -90,8 +90,8 @@ struct IniFile : IniLoadFile {
 

	
 
	bool SaveToDisk(const std::string &filename);
 

	
 
	virtual FILE *OpenFile(const std::string &filename, Subdirectory subdir, size_t *size);
 
	virtual void ReportFileError(const char * const pre, const char * const buffer, const char * const post);
 
	FILE *OpenFile(const std::string &filename, Subdirectory subdir, size_t *size) override;
 
	void ReportFileError(const char * const pre, const char * const buffer, const char * const post) override;
 
};
 

	
 
#endif /* INI_TYPE_H */
src/linkgraph/demands.h
Show inline comments
 
@@ -32,7 +32,7 @@ public:
 
	 * Call the demand calculator on the given component.
 
	 * @param job Component to calculate the demands for.
 
	 */
 
	virtual void Run(LinkGraphJob &job) const { DemandCalculator c(job); }
 
	void Run(LinkGraphJob &job) const override { DemandCalculator c(job); }
 

	
 
	/**
 
	 * Virtual destructor has to be defined because of virtual Run().
src/linkgraph/flowmapper.h
Show inline comments
 
@@ -28,7 +28,7 @@ public:
 
	 *              values. Only do that on the very last flow mapping.
 
	 */
 
	FlowMapper(bool scale) : scale(scale) {}
 
	virtual void Run(LinkGraphJob &job) const;
 
	void Run(LinkGraphJob &job) const override;
 

	
 
private:
 

	
src/linkgraph/init.h
Show inline comments
 
@@ -16,7 +16,7 @@ public:
 
	 * Initialize the link graph job.
 
	 * @param job Job to be initialized.
 
	 */
 
	virtual void Run(LinkGraphJob &job) const { job.Init(); }
 
	void Run(LinkGraphJob &job) const override { job.Init(); }
 
};
 

	
 
#endif /* INIT_H */
src/linkgraph/mcf.h
Show inline comments
 
@@ -80,7 +80,7 @@ public:
 
	 * Run the calculation.
 
	 * @param graph Component to be calculated.
 
	 */
 
	virtual void Run(LinkGraphJob &job) const { Tpass pass(job); }
 
	void Run(LinkGraphJob &job) const override { Tpass pass(job); }
 
};
 

	
 
#endif /* MCF_H */
src/network/network_server.h
Show inline comments
 
@@ -75,7 +75,7 @@ public:
 
	ServerNetworkGameSocketHandler(SOCKET s);
 
	~ServerNetworkGameSocketHandler();
 

	
 
	virtual Packet *ReceivePacket() override;
 
	Packet *ReceivePacket() override;
 
	NetworkRecvStatus CloseConnection(NetworkRecvStatus status) override;
 
	std::string GetClientName() const;
 

	
src/newgrf_airport.h
Show inline comments
 
@@ -43,7 +43,7 @@ public:
 
	{
 
	}
 

	
 
	inline TileIterator& operator ++()
 
	inline TileIterator& operator ++() override
 
	{
 
		this->att++;
 
		if (this->att->ti.x == -0x80) {
 
@@ -60,7 +60,7 @@ public:
 
		return this->att->gfx;
 
	}
 

	
 
	virtual std::unique_ptr<TileIterator> Clone() const
 
	std::unique_ptr<TileIterator> Clone() const override
 
	{
 
		return std::make_unique<AirportTileTableIterator>(*this);
 
	}
src/newgrf_commons.h
Show inline comments
 
@@ -246,7 +246,7 @@ public:
 
struct IndustryTileSpec;
 
class IndustryTileOverrideManager : public OverrideManagerBase {
 
protected:
 
	virtual bool CheckValidNewID(uint16_t testid) { return testid != 0xFF; }
 
	bool CheckValidNewID(uint16_t testid) override { return testid != 0xFF; }
 
public:
 
	IndustryTileOverrideManager(uint16_t offset, uint16_t maximum, uint16_t invalid) :
 
			OverrideManagerBase(offset, maximum, invalid) {}
 
@@ -266,7 +266,7 @@ public:
 
struct AirportTileSpec;
 
class AirportTileOverrideManager : public OverrideManagerBase {
 
protected:
 
	virtual bool CheckValidNewID(uint16_t testid) override { return testid != 0xFF; }
 
	bool CheckValidNewID(uint16_t testid) override { return testid != 0xFF; }
 
public:
 
	AirportTileOverrideManager(uint16_t offset, uint16_t maximum, uint16_t invalid) :
 
			OverrideManagerBase(offset, maximum, invalid) {}
 
@@ -277,7 +277,7 @@ public:
 
struct ObjectSpec;
 
class ObjectOverrideManager : public OverrideManagerBase {
 
protected:
 
	virtual bool CheckValidNewID(uint16_t testid) override { return testid != 0xFF; }
 
	bool CheckValidNewID(uint16_t testid) override { return testid != 0xFF; }
 
public:
 
	ObjectOverrideManager(uint16_t offset, uint16_t maximum, uint16_t invalid) :
 
			OverrideManagerBase(offset, maximum, invalid) {}
src/newgrf_roadtype.h
Show inline comments
 
@@ -32,8 +32,8 @@ struct RoadTypeScopeResolver : public Sc
 
	{
 
	}
 

	
 
	/* virtual */ uint32_t GetRandomBits() const;
 
	/* virtual */ uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const;
 
	uint32_t GetRandomBits() const override;
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
};
 

	
 
/** Resolver object for road types. */
src/newgrf_spritegroup.h
Show inline comments
 
@@ -90,7 +90,7 @@ struct RealSpriteGroup : SpriteGroup {
 
	std::vector<const SpriteGroup *> loading; ///< List of loading groups (can be SpriteIDs or Callback results)
 

	
 
protected:
 
	const SpriteGroup *Resolve(ResolverObject &object) const;
 
	const SpriteGroup *Resolve(ResolverObject &object) const override;
 
};
 

	
 
/* Shared by deterministic and random groups. */
 
@@ -179,7 +179,7 @@ struct DeterministicSpriteGroup : Sprite
 
	const SpriteGroup *error_group; // was first range, before sorting ranges
 

	
 
protected:
 
	const SpriteGroup *Resolve(ResolverObject &object) const;
 
	const SpriteGroup *Resolve(ResolverObject &object) const override;
 
};
 

	
 
enum RandomizedSpriteGroupCompareMode {
 
@@ -201,7 +201,7 @@ struct RandomizedSpriteGroup : SpriteGro
 
	std::vector<const SpriteGroup *> groups; ///< Take the group with appropriate index:
 

	
 
protected:
 
	const SpriteGroup *Resolve(ResolverObject &object) const;
 
	const SpriteGroup *Resolve(ResolverObject &object) const override;
 
};
 

	
 

	
 
@@ -227,7 +227,7 @@ struct CallbackResultSpriteGroup : Sprit
 
	}
 

	
 
	uint16_t result;
 
	uint16_t GetCallbackResult() const { return this->result; }
 
	uint16_t GetCallbackResult() const override { return this->result; }
 
};
 

	
 

	
 
@@ -249,8 +249,8 @@ struct ResultSpriteGroup : SpriteGroup {
 

	
 
	SpriteID sprite;
 
	byte num_sprites;
 
	SpriteID GetResult() const { return this->sprite; }
 
	byte GetNumResults() const { return this->num_sprites; }
 
	SpriteID GetResult() const override { return this->sprite; }
 
	byte GetNumResults() const override { return this->num_sprites; }
 
};
 

	
 
/**
src/newgrf_storage.h
Show inline comments
 
@@ -113,7 +113,7 @@ struct PersistentStorageArray : BasePers
 
		return this->storage[pos];
 
	}
 

	
 
	void ClearChanges()
 
	void ClearChanges() override
 
	{
 
		if (this->prev_storage) {
 
			this->storage = *this->prev_storage;
src/newgrf_town.h
Show inline comments
 
@@ -34,8 +34,8 @@ struct TownScopeResolver : public ScopeR
 
	{
 
	}
 

	
 
	virtual uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const;
 
	virtual void StorePSA(uint reg, int32_t value);
 
	uint32_t GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const override;
 
	void StorePSA(uint reg, int32_t value) override;
 
};
 

	
 
/** Resolver of town properties. */
src/openttd.cpp
Show inline comments
 
@@ -399,7 +399,7 @@ struct AfterNewGRFScan : NewGRFScanCallb
 
		static_assert(sizeof(generation_seed) == sizeof(_settings_game.game_creation.generation_seed));
 
	}
 

	
 
	virtual void OnNewGRFsScanned()
 
	void OnNewGRFsScanned() override
 
	{
 
		ResetGRFConfig(false);
 

	
src/saveload/station_sl.cpp
Show inline comments
 
@@ -665,19 +665,19 @@ public:
 
	};
 
	inline const static SaveLoadCompatTable compat_description = _station_normal_sl_compat;
 

	
 
	void Save(BaseStation *bst) const
 
	void Save(BaseStation *bst) const override
 
	{
 
		if ((bst->facilities & FACIL_WAYPOINT) != 0) return;
 
		SlObject(bst, this->GetDescription());
 
	}
 

	
 
	void Load(BaseStation *bst) const
 
	void Load(BaseStation *bst) const override
 
	{
 
		if ((bst->facilities & FACIL_WAYPOINT) != 0) return;
 
		SlObject(bst, this->GetLoadDescription());
 
	}
 

	
 
	void FixPointers(BaseStation *bst) const
 
	void FixPointers(BaseStation *bst) const override
 
	{
 
		if ((bst->facilities & FACIL_WAYPOINT) != 0) return;
 
		SlObject(bst, this->GetDescription());
 
@@ -696,19 +696,19 @@ public:
 
	};
 
	inline const static SaveLoadCompatTable compat_description = _station_waypoint_sl_compat;
 

	
 
	void Save(BaseStation *bst) const
 
	void Save(BaseStation *bst) const override
 
	{
 
		if ((bst->facilities & FACIL_WAYPOINT) == 0) return;
 
		SlObject(bst, this->GetDescription());
 
	}
 

	
 
	void Load(BaseStation *bst) const
 
	void Load(BaseStation *bst) const override
 
	{
 
		if ((bst->facilities & FACIL_WAYPOINT) == 0) return;
 
		SlObject(bst, this->GetLoadDescription());
 
	}
 

	
 
	void FixPointers(BaseStation *bst) const
 
	void FixPointers(BaseStation *bst) const override
 
	{
 
		if ((bst->facilities & FACIL_WAYPOINT) == 0) return;
 
		SlObject(bst, this->GetDescription());
src/script/api/script_asyncmode.hpp
Show inline comments
 
@@ -57,7 +57,7 @@ public:
 
	/**
 
	 * @api -all
 
	 */
 
	virtual void FinalRelease();
 
	void FinalRelease() override;
 
};
 

	
 
#endif /* SCRIPT_ASYNCMODE_HPP */
src/script/api/script_execmode.hpp
Show inline comments
 
@@ -48,7 +48,7 @@ public:
 
	/**
 
	 * @api -all
 
	 */
 
	virtual void FinalRelease();
 
	void FinalRelease() override;
 
};
 

	
 
#endif /* SCRIPT_EXECMODE_HPP */
src/script/api/script_list.cpp
Show inline comments
 
@@ -90,7 +90,7 @@ public:
 
		this->End();
 
	}
 

	
 
	SQInteger Begin()
 
	SQInteger Begin() override
 
	{
 
		if (this->list->buckets.empty()) return 0;
 
		this->has_no_more_items = false;
 
@@ -105,7 +105,7 @@ public:
 
		return item_current;
 
	}
 

	
 
	void End()
 
	void End() override
 
	{
 
		this->bucket_list = nullptr;
 
		this->has_no_more_items = true;
 
@@ -135,7 +135,7 @@ public:
 
		this->item_next = *this->bucket_list_iter;
 
	}
 

	
 
	SQInteger Next()
 
	SQInteger Next() override
 
	{
 
		if (this->IsEnd()) return 0;
 

	
 
@@ -144,7 +144,7 @@ public:
 
		return item_current;
 
	}
 

	
 
	void Remove(SQInteger item)
 
	void Remove(SQInteger item) override
 
	{
 
		if (this->IsEnd()) return;
 

	
 
@@ -179,7 +179,7 @@ public:
 
		this->End();
 
	}
 

	
 
	SQInteger Begin()
 
	SQInteger Begin() override
 
	{
 
		if (this->list->buckets.empty()) return 0;
 
		this->has_no_more_items = false;
 
@@ -199,7 +199,7 @@ public:
 
		return item_current;
 
	}
 

	
 
	void End()
 
	void End() override
 
	{
 
		this->bucket_list = nullptr;
 
		this->has_no_more_items = true;
 
@@ -232,7 +232,7 @@ public:
 
		this->item_next = *this->bucket_list_iter;
 
	}
 

	
 
	SQInteger Next()
 
	SQInteger Next() override
 
	{
 
		if (this->IsEnd()) return 0;
 

	
 
@@ -241,7 +241,7 @@ public:
 
		return item_current;
 
	}
 

	
 
	void Remove(SQInteger item)
 
	void Remove(SQInteger item) override
 
	{
 
		if (this->IsEnd()) return;
 

	
 
@@ -271,7 +271,7 @@ public:
 
		this->End();
 
	}
 

	
 
	SQInteger Begin()
 
	SQInteger Begin() override
 
	{
 
		if (this->list->items.empty()) return 0;
 
		this->has_no_more_items = false;
 
@@ -284,7 +284,7 @@ public:
 
		return item_current;
 
	}
 

	
 
	void End()
 
	void End() override
 
	{
 
		this->has_no_more_items = true;
 
	}
 
@@ -302,7 +302,7 @@ public:
 
		if (this->item_iter != this->list->items.end()) item_next = (*this->item_iter).first;
 
	}
 

	
 
	SQInteger Next()
 
	SQInteger Next() override
 
	{
 
		if (this->IsEnd()) return 0;
 

	
 
@@ -311,7 +311,7 @@ public:
 
		return item_current;
 
	}
 

	
 
	void Remove(SQInteger item)
 
	void Remove(SQInteger item) override
 
	{
 
		if (this->IsEnd()) return;
 

	
 
@@ -344,7 +344,7 @@ public:
 
		this->End();
 
	}
 

	
 
	SQInteger Begin()
 
	SQInteger Begin() override
 
	{
 
		if (this->list->items.empty()) return 0;
 
		this->has_no_more_items = false;
 
@@ -358,7 +358,7 @@ public:
 
		return item_current;
 
	}
 

	
 
	void End()
 
	void End() override
 
	{
 
		this->has_no_more_items = true;
 
	}
 
@@ -381,7 +381,7 @@ public:
 
		if (this->item_iter != this->list->items.end()) item_next = (*this->item_iter).first;
 
	}
 

	
 
	SQInteger Next()
 
	SQInteger Next() override
 
	{
 
		if (this->IsEnd()) return 0;
 

	
 
@@ -390,7 +390,7 @@ public:
 
		return item_current;
 
	}
 

	
 
	void Remove(SQInteger item)
 
	void Remove(SQInteger item) override
 
	{
 
		if (this->IsEnd()) return;
 

	
src/script/api/script_testmode.hpp
Show inline comments
 
@@ -50,7 +50,7 @@ public:
 
	/**
 
	 * @api -all
 
	 */
 
	virtual void FinalRelease();
 
	void FinalRelease() override;
 
};
 

	
 
#endif /* SCRIPT_TESTMODE_HPP */
src/script/api/script_text.hpp
Show inline comments
 
@@ -125,7 +125,7 @@ public:
 
	/**
 
	 * @api -all
 
	 */
 
	virtual std::string GetEncodedText();
 
	std::string GetEncodedText() override;
 

	
 
private:
 
	using ScriptTextRef = ScriptObjectRef<ScriptText>;
src/settings_gui.cpp
Show inline comments
 
@@ -1016,11 +1016,11 @@ struct SettingEntry : BaseSettingEntry {
 

	
 
	SettingEntry(const char *name);
 

	
 
	virtual void Init(byte level = 0);
 
	virtual void ResetAll();
 
	virtual uint Length() const;
 
	virtual uint GetMaxHelpHeight(int maxw);
 
	virtual bool UpdateFilterState(SettingFilter &filter, bool force_visible);
 
	void Init(byte level = 0) override;
 
	void ResetAll() override;
 
	uint Length() const override;
 
	uint GetMaxHelpHeight(int maxw) override;
 
	bool UpdateFilterState(SettingFilter &filter, bool force_visible) override;
 

	
 
	void SetButtons(byte new_val);
 

	
 
@@ -1036,7 +1036,7 @@ struct SettingEntry : BaseSettingEntry {
 
	void SetValueDParams(uint first_param, int32_t value) const;
 

	
 
protected:
 
	virtual void DrawSetting(GameSettings *settings_ptr, int left, int right, int y, bool highlight) const;
 
	void DrawSetting(GameSettings *settings_ptr, int left, int right, int y, bool highlight) const override;
 

	
 
private:
 
	bool IsVisibleByRestrictionMode(RestrictionMode mode) const;
 
@@ -1077,23 +1077,23 @@ struct SettingsPage : BaseSettingEntry, 
 

	
 
	SettingsPage(StringID title);
 

	
 
	virtual void Init(byte level = 0);
 
	virtual void ResetAll();
 
	virtual void FoldAll();
 
	virtual void UnFoldAll();
 

	
 
	virtual uint Length() const;
 
	virtual void GetFoldingState(bool &all_folded, bool &all_unfolded) const;
 
	virtual bool IsVisible(const BaseSettingEntry *item) const;
 
	virtual BaseSettingEntry *FindEntry(uint row, uint *cur_row);
 
	virtual uint GetMaxHelpHeight(int maxw) { return SettingsContainer::GetMaxHelpHeight(maxw); }
 

	
 
	virtual bool UpdateFilterState(SettingFilter &filter, bool force_visible);
 

	
 
	virtual uint Draw(GameSettings *settings_ptr, int left, int right, int y, uint first_row, uint max_row, BaseSettingEntry *selected, uint cur_row = 0, uint parent_last = 0) const;
 
	void Init(byte level = 0) override;
 
	void ResetAll() override;
 
	void FoldAll() override;
 
	void UnFoldAll() override;
 

	
 
	uint Length() const override;
 
	void GetFoldingState(bool &all_folded, bool &all_unfolded) const override;
 
	bool IsVisible(const BaseSettingEntry *item) const override;
 
	BaseSettingEntry *FindEntry(uint row, uint *cur_row) override;
 
	uint GetMaxHelpHeight(int maxw) override { return SettingsContainer::GetMaxHelpHeight(maxw); }
 

	
 
	bool UpdateFilterState(SettingFilter &filter, bool force_visible) override;
 

	
 
	uint Draw(GameSettings *settings_ptr, int left, int right, int y, uint first_row, uint max_row, BaseSettingEntry *selected, uint cur_row = 0, uint parent_last = 0) const override;
 

	
 
protected:
 
	virtual void DrawSetting(GameSettings *settings_ptr, int left, int right, int y, bool highlight) const;
 
	void DrawSetting(GameSettings *settings_ptr, int left, int right, int y, bool highlight) const override;
 
};
 

	
 
/* == BaseSettingEntry methods == */
src/settingsgen/settingsgen.cpp
Show inline comments
 
@@ -159,7 +159,7 @@ struct SettingsIniFile : IniLoadFile {
 
	{
 
	}
 

	
 
	virtual FILE *OpenFile(const std::string &filename, Subdirectory, size_t *size)
 
	FILE *OpenFile(const std::string &filename, Subdirectory, size_t *size) override
 
	{
 
		/* Open the text file in binary mode to prevent end-of-line translations
 
		 * done by ftell() and friends, as defined by K&R. */
 
@@ -173,7 +173,7 @@ struct SettingsIniFile : IniLoadFile {
 
		return in;
 
	}
 

	
 
	virtual void ReportFileError(const char * const pre, const char * const buffer, const char * const post)
 
	void ReportFileError(const char * const pre, const char * const buffer, const char * const post) override
 
	{
 
		FatalError("{}{}{}", pre, buffer, post);
 
	}
src/sound/allegro_s.h
Show inline comments
 
@@ -15,19 +15,19 @@
 
/** Implementation of the allegro sound driver. */
 
class SoundDriver_Allegro : public SoundDriver {
 
public:
 
	const char *Start(const StringList &param);
 
	const char *Start(const StringList &param) override;
 

	
 
	void Stop();
 
	void Stop() override;
 

	
 
	void MainLoop();
 
	const char *GetName() const { return "allegro"; }
 
	void MainLoop() override;
 
	const char *GetName() const override { return "allegro"; }
 
};
 

	
 
/** Factory for the allegro sound driver. */
 
class FSoundDriver_Allegro : public DriverFactoryBase {
 
public:
 
	FSoundDriver_Allegro() : DriverFactoryBase(Driver::DT_SOUND, 4, "allegro", "Allegro Sound Driver (param hz,samples)") {}
 
	/* virtual */ Driver *CreateInstance() const { return new SoundDriver_Allegro(); }
 
	Driver *CreateInstance() const override { return new SoundDriver_Allegro(); }
 
};
 

	
 
#endif /* SOUND_ALLEGRO_H */
src/spriteloader/grf.hpp
Show inline comments
 
@@ -17,7 +17,7 @@ class SpriteLoaderGrf : public SpriteLoa
 
	byte container_ver;
 
public:
 
	SpriteLoaderGrf(byte container_ver) : container_ver(container_ver) {}
 
	uint8_t LoadSprite(SpriteLoader::Sprite *sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, byte control_flags);
 
	uint8_t LoadSprite(SpriteLoader::Sprite *sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, byte control_flags) override;
 
};
 

	
 
#endif /* SPRITELOADER_GRF_HPP */
src/station_base.h
Show inline comments
 
@@ -538,7 +538,7 @@ public:
 
		if (!st->TileBelongsToAirport(this->tile)) ++(*this);
 
	}
 

	
 
	inline TileIterator& operator ++()
 
	inline TileIterator& operator ++() override
 
	{
 
		(*this).OrthogonalTileIterator::operator++();
 
		while (this->tile != INVALID_TILE && !st->TileBelongsToAirport(this->tile)) {
 
@@ -547,7 +547,7 @@ public:
 
		return *this;
 
	}
 

	
 
	virtual std::unique_ptr<TileIterator> Clone() const
 
	std::unique_ptr<TileIterator> Clone() const override
 
	{
 
		return std::make_unique<AirportTileIterator>(*this);
 
	}
src/strgen/strgen.cpp
Show inline comments
 
@@ -238,7 +238,7 @@ struct HeaderFileWriter : HeaderWriter, 
 
		this->output_stream << "#define TABLE_STRINGS_H\n";
 
	}
 

	
 
	void WriteStringID(const std::string &name, int stringid)
 
	void WriteStringID(const std::string &name, int stringid) override
 
	{
 
		if (prev + 1 != stringid) this->output_stream << "\n";
 
		fmt::print(this->output_stream, "static const StringID {} = 0x{:X};\n", name, stringid);
 
@@ -246,7 +246,7 @@ struct HeaderFileWriter : HeaderWriter, 
 
		total_strings++;
 
	}
 

	
 
	void Finalise(const StringData &data)
 
	void Finalise(const StringData &data) override
 
	{
 
		/* Find the plural form with the most amount of cases. */
 
		int max_plural_forms = 0;
 
@@ -293,18 +293,18 @@ struct LanguageFileWriter : LanguageWrit
 
	{
 
	}
 

	
 
	void WriteHeader(const LanguagePackHeader *header)
 
	void WriteHeader(const LanguagePackHeader *header) override
 
	{
 
		this->Write((const byte *)header, sizeof(*header));
 
	}
 

	
 
	void Finalise()
 
	void Finalise() override
 
	{
 
		this->output_stream.put(0);
 
		this->FileWriter::Finalise();
 
	}
 

	
 
	void Write(const byte *buffer, size_t length)
 
	void Write(const byte *buffer, size_t length) override
 
	{
 
		this->output_stream.write((const char *)buffer, length);
 
	}
src/string.cpp
Show inline comments
 
@@ -812,14 +812,14 @@ public:
 
	{
 
	}
 

	
 
	virtual void SetString(const char *s)
 
	void SetString(const char *s) override
 
	{
 
		this->string = s;
 
		this->len = strlen(s);
 
		this->cur_pos = 0;
 
	}
 

	
 
	virtual size_t SetCurPosition(size_t pos)
 
	size_t SetCurPosition(size_t pos) override
 
	{
 
		assert(this->string != nullptr && pos <= this->len);
 
		/* Sanitize in case we get a position inside an UTF-8 sequence. */
 
@@ -827,7 +827,7 @@ public:
 
		return this->cur_pos = pos;
 
	}
 

	
 
	virtual size_t Next(IterType what)
 
	size_t Next(IterType what) override
 
	{
 
		assert(this->string != nullptr);
 

	
 
@@ -865,7 +865,7 @@ public:
 
		return END;
 
	}
 

	
 
	virtual size_t Prev(IterType what)
 
	size_t Prev(IterType what) override
 
	{
 
		assert(this->string != nullptr);
 

	
src/tilearea_type.h
Show inline comments
 
@@ -210,7 +210,7 @@ public:
 
	/**
 
	 * Move ourselves to the next tile in the rectangle on the map.
 
	 */
 
	inline TileIterator& operator ++()
 
	inline TileIterator& operator ++() override
 
	{
 
		assert(this->tile != INVALID_TILE);
 

	
 
@@ -225,7 +225,7 @@ public:
 
		return *this;
 
	}
 

	
 
	virtual std::unique_ptr<TileIterator> Clone() const
 
	std::unique_ptr<TileIterator> Clone() const override
 
	{
 
		return std::make_unique<OrthogonalTileIterator>(*this);
 
	}
 
@@ -262,9 +262,9 @@ public:
 
		*this = DiagonalTileIterator(DiagonalTileArea(corner1, corner2));
 
	}
 

	
 
	TileIterator& operator ++();
 
	TileIterator& operator ++() override;
 

	
 
	virtual std::unique_ptr<TileIterator> Clone() const
 
	std::unique_ptr<TileIterator> Clone() const override
 
	{
 
		return std::make_unique<DiagonalTileIterator>(*this);
 
	}
0 comments (0 inline, 0 general)