Cleanup: missing spaces before continuation * in some comments

This commit is contained in:
Rubidium 2023-11-01 21:46:33 +01:00 committed by rubidium42
parent c687b59efc
commit c6411168d8
25 changed files with 104 additions and 104 deletions

View File

@ -457,7 +457,7 @@ void IConsoleGUIPrint(TextColour colour_code, const std::string &str)
* all lines in the buffer are aged by one. When a line exceeds both the maximum position * all lines in the buffer are aged by one. When a line exceeds both the maximum position
* and also the maximum age, it gets removed. * and also the maximum age, it gets removed.
* @return true if any lines were removed * @return true if any lines were removed
*/ */
static bool TruncateBuffer() static bool TruncateBuffer()
{ {
bool need_truncation = false; bool need_truncation = false;

View File

@ -324,7 +324,7 @@ static inline T ROR(const T x, const uint8_t n)
* Iterable ensemble of each set bit in a value. * Iterable ensemble of each set bit in a value.
* @tparam Tbitpos Type of the position variable. * @tparam Tbitpos Type of the position variable.
* @tparam Tbitset Type of the bitset value. * @tparam Tbitset Type of the bitset value.
*/ */
template <typename Tbitpos = uint, typename Tbitset = uint> template <typename Tbitpos = uint, typename Tbitset = uint>
struct SetBitIterator { struct SetBitIterator {
struct Iterator { struct Iterator {

View File

@ -447,14 +447,14 @@ public:
} }
/** /**
* Find all items contained within the given rectangle. * Find all items contained within the given rectangle.
* @note Start coordinates are inclusive, end coordinates are exclusive. x1<x2 && y1<y2 is a precondition. * @note Start coordinates are inclusive, end coordinates are exclusive. x1<x2 && y1<y2 is a precondition.
* @param x1 Start first coordinate, points found are greater or equals to this. * @param x1 Start first coordinate, points found are greater or equals to this.
* @param y1 Start second coordinate, points found are greater or equals to this. * @param y1 Start second coordinate, points found are greater or equals to this.
* @param x2 End first coordinate, points found are less than this. * @param x2 End first coordinate, points found are less than this.
* @param y2 End second coordinate, points found are less than this. * @param y2 End second coordinate, points found are less than this.
* @param outputter Callback used to return values from the search. * @param outputter Callback used to return values from the search.
*/ */
template <typename Outputter> template <typename Outputter>
void FindContained(CoordT x1, CoordT y1, CoordT x2, CoordT y2, const Outputter &outputter) const void FindContained(CoordT x1, CoordT y1, CoordT x2, CoordT y2, const Outputter &outputter) const
{ {

View File

@ -719,7 +719,7 @@ void ScanScenarios()
/** /**
* Constructs FiosNumberedSaveName. Initial number is the most recent save, or -1 if not found. * Constructs FiosNumberedSaveName. Initial number is the most recent save, or -1 if not found.
* @param prefix The prefix to use to generate a filename. * @param prefix The prefix to use to generate a filename.
*/ */
FiosNumberedSaveName::FiosNumberedSaveName(const std::string &prefix) : prefix(prefix), number(-1) FiosNumberedSaveName::FiosNumberedSaveName(const std::string &prefix) : prefix(prefix), number(-1)
{ {
static std::optional<std::string> _autosave_path; static std::optional<std::string> _autosave_path;
@ -756,7 +756,7 @@ FiosNumberedSaveName::FiosNumberedSaveName(const std::string &prefix) : prefix(p
/** /**
* Generate a savegame name and number according to _settings_client.gui.max_num_autosaves. * Generate a savegame name and number according to _settings_client.gui.max_num_autosaves.
* @return A filename in format "<prefix><number>.sav". * @return A filename in format "<prefix><number>.sav".
*/ */
std::string FiosNumberedSaveName::Filename() std::string FiosNumberedSaveName::Filename()
{ {
if (++this->number >= _settings_client.gui.max_num_autosaves) this->number = 0; if (++this->number >= _settings_client.gui.max_num_autosaves) this->number = 0;
@ -766,7 +766,7 @@ std::string FiosNumberedSaveName::Filename()
/** /**
* Generate an extension for a savegame name. * Generate an extension for a savegame name.
* @return An extension in format "-<prefix>.sav". * @return An extension in format "-<prefix>.sav".
*/ */
std::string FiosNumberedSaveName::Extension() std::string FiosNumberedSaveName::Extension()
{ {
return fmt::format("-{}.sav", this->prefix); return fmt::format("-{}.sav", this->prefix);

View File

@ -1,9 +1,9 @@
/* /*
* This file is part of OpenTTD. * This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** @file framerate_gui.cpp GUI for displaying framerate/game speed information. */ /** @file framerate_gui.cpp GUI for displaying framerate/game speed information. */
@ -802,7 +802,7 @@ struct FrametimeGraphWindow : Window {
void SelectHorizontalScale(TimingMeasurement range) void SelectHorizontalScale(TimingMeasurement range)
{ {
/* Determine horizontal scale based on period covered by 60 points /* Determine horizontal scale based on period covered by 60 points
* (slightly less than 2 seconds at full game speed) */ * (slightly less than 2 seconds at full game speed) */
struct ScaleDef { TimingMeasurement range; int scale; }; struct ScaleDef { TimingMeasurement range; int scale; };
static const ScaleDef hscales[] = { static const ScaleDef hscales[] = {
{ 120, 60 }, { 120, 60 },

View File

@ -1,9 +1,9 @@
/* /*
* This file is part of OpenTTD. * This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** @file framerate_type.h /** @file framerate_type.h
* Types for recording game performance data. * Types for recording game performance data.

View File

@ -1,9 +1,9 @@
/* /*
* This file is part of OpenTTD. * This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* @file midi.h Declarations for MIDI data */ /* @file midi.h Declarations for MIDI data */

View File

@ -1,9 +1,9 @@
/* /*
* This file is part of OpenTTD. * This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* @file midifile.cpp Parser for standard MIDI files */ /* @file midifile.cpp Parser for standard MIDI files */

View File

@ -1,9 +1,9 @@
/* /*
* This file is part of OpenTTD. * This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* @file midifile.hpp Parser for standard MIDI files */ /* @file midifile.hpp Parser for standard MIDI files */

View File

@ -171,9 +171,9 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::CloseConnection(NetworkRecvSta
this->SendPackets(true); this->SendPackets(true);
/* Wait a number of ticks so our leave message can reach the server. /* Wait a number of ticks so our leave message can reach the server.
* This is especially needed for Windows servers as they seem to get * This is especially needed for Windows servers as they seem to get
* the "socket is closed" message before receiving our leave message, * the "socket is closed" message before receiving our leave message,
* which would trigger the server to close the connection as well. */ * which would trigger the server to close the connection as well. */
CSleep(3 * MILLISECONDS_PER_TICK); CSleep(3 * MILLISECONDS_PER_TICK);
} }

View File

@ -219,7 +219,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentType type)
p->Send_string("patchpack"); // Or what-ever the name of your patchpack is. p->Send_string("patchpack"); // Or what-ever the name of your patchpack is.
p->Send_string(_openttd_content_version_patchpack); p->Send_string(_openttd_content_version_patchpack);
*/ */
this->SendPacket(p); this->SendPacket(p);
} }

View File

@ -3591,12 +3591,12 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop,
it.ti.y = (int8_t)GB(it.ti.y, 0, 8); it.ti.y = (int8_t)GB(it.ti.y, 0, 8);
/* When there were only 256x256 maps, TileIndex was a uint16_t and /* When there were only 256x256 maps, TileIndex was a uint16_t and
* it.ti was just a TileIndexDiff that was added to it. * it.ti was just a TileIndexDiff that was added to it.
* As such negative "x" values were shifted into the "y" position. * As such negative "x" values were shifted into the "y" position.
* x = -1, y = 1 -> x = 255, y = 0 * x = -1, y = 1 -> x = 255, y = 0
* Since GRF version 8 the position is interpreted as pair of independent int8. * Since GRF version 8 the position is interpreted as pair of independent int8.
* For GRF version < 8 we need to emulate the old shifting behaviour. * For GRF version < 8 we need to emulate the old shifting behaviour.
*/ */
if (_cur.grffile->grf_version < 8 && it.ti.x < 0) it.ti.y += 1; if (_cur.grffile->grf_version < 8 && it.ti.x < 0) it.ti.y += 1;
} }
} }
@ -9348,8 +9348,8 @@ static void FinaliseIndustriesArray()
StringID strid; StringID strid;
/* process the conversion of text at the end, so to be sure everything will be fine /* process the conversion of text at the end, so to be sure everything will be fine
* and available. Check if it does not return undefind marker, which is a very good sign of a * and available. Check if it does not return undefind marker, which is a very good sign of a
* substitute industry who has not changed the string been examined, thus using it as such */ * substitute industry who has not changed the string been examined, thus using it as such */
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->name); strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->name);
if (strid != STR_UNDEFINED) indsp->name = strid; if (strid != STR_UNDEFINED) indsp->name = strid;
@ -9367,7 +9367,7 @@ static void FinaliseIndustriesArray()
if (indsp->station_name != STR_NULL) { if (indsp->station_name != STR_NULL) {
/* STR_NULL (0) can be set by grf. It has a meaning regarding assignation of the /* STR_NULL (0) can be set by grf. It has a meaning regarding assignation of the
* station's name. Don't want to lose the value, therefore, do not process. */ * station's name. Don't want to lose the value, therefore, do not process. */
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->station_name); strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->station_name);
if (strid != STR_UNDEFINED) indsp->station_name = strid; if (strid != STR_UNDEFINED) indsp->station_name = strid;
} }

View File

@ -21,12 +21,12 @@ struct RoadTypeScopeResolver : public ScopeResolver {
const RoadTypeInfo *rti; const RoadTypeInfo *rti;
/** /**
* Constructor of the roadtype scope resolvers. * Constructor of the roadtype scope resolvers.
* @param ro Surrounding resolver. * @param ro Surrounding resolver.
* @param rti Associated RoadTypeInfo. * @param rti Associated RoadTypeInfo.
* @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead. * @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
* @param context Are we resolving sprites for the upper halftile, or on a bridge? * @param context Are we resolving sprites for the upper halftile, or on a bridge?
*/ */
RoadTypeScopeResolver(ResolverObject &ro, const RoadTypeInfo *rti, TileIndex tile, TileContext context) RoadTypeScopeResolver(ResolverObject &ro, const RoadTypeInfo *rti, TileIndex tile, TileContext context)
: ScopeResolver(ro), tile(tile), context(context), rti(rti) : ScopeResolver(ro), tile(tile), context(context), rti(rti)
{ {

View File

@ -79,8 +79,8 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face)
if (!font_style.empty() && !StrEqualsIgnoreCase(font_style, (char *)style)) continue; if (!font_style.empty() && !StrEqualsIgnoreCase(font_style, (char *)style)) continue;
/* Font config takes the best shot, which, if the family name is spelled /* Font config takes the best shot, which, if the family name is spelled
* wrongly a 'random' font, so check whether the family name is the * wrongly a 'random' font, so check whether the family name is the
* same as the supplied name */ * same as the supplied name */
if (StrEqualsIgnoreCase(font_family, (char *)family)) { if (StrEqualsIgnoreCase(font_family, (char *)family)) {
err = FT_New_Face(_library, (char *)file, index, face); err = FT_New_Face(_library, (char *)file, index, face);
} }

View File

@ -28,21 +28,21 @@ public:
static const bool SUPPORTS_RTL = true; static const bool SUPPORTS_RTL = true;
/** /**
* Get the actual ParagraphLayout for the given buffer. * Get the actual ParagraphLayout for the given buffer.
* @param buff The begin of the buffer. * @param buff The begin of the buffer.
* @param buff_end The location after the last element in the buffer. * @param buff_end The location after the last element in the buffer.
* @param fontMapping THe mapping of the fonts. * @param fontMapping THe mapping of the fonts.
* @return The ParagraphLayout instance. * @return The ParagraphLayout instance.
*/ */
static ParagraphLayouter *GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping); static ParagraphLayouter *GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping);
/** /**
* Append a wide character to the internal buffer. * Append a wide character to the internal buffer.
* @param buff The buffer to append to. * @param buff The buffer to append to.
* @param buffer_last The end of the buffer. * @param buffer_last The end of the buffer.
* @param c The character to add. * @param c The character to add.
* @return The number of buffer spaces that were used. * @return The number of buffer spaces that were used.
*/ */
static size_t AppendToBuffer(CharType *buff, const CharType *buffer_last, char32_t c) static size_t AppendToBuffer(CharType *buff, const CharType *buffer_last, char32_t c)
{ {
assert(buff < buffer_last); assert(buff < buffer_last);

View File

@ -31,7 +31,7 @@
* If changing the call paths into the scripting engine, define this symbol to enable full debugging of allocations. * If changing the call paths into the scripting engine, define this symbol to enable full debugging of allocations.
* This lets you track whether the allocator context is being switched correctly in all call paths. * This lets you track whether the allocator context is being switched correctly in all call paths.
#define SCRIPT_DEBUG_ALLOCATIONS #define SCRIPT_DEBUG_ALLOCATIONS
*/ */
struct ScriptAllocator { struct ScriptAllocator {
size_t allocated_size; ///< Sum of allocated data size size_t allocated_size; ///< Sum of allocated data size

View File

@ -413,7 +413,7 @@ size_t OneOfManySettingDesc::ParseValue(const char *str) const
{ {
size_t r = OneOfManySettingDesc::ParseSingleValue(str, strlen(str), this->many); size_t r = OneOfManySettingDesc::ParseSingleValue(str, strlen(str), this->many);
/* if the first attempt of conversion from string to the appropriate value fails, /* if the first attempt of conversion from string to the appropriate value fails,
* look if we have defined a converter from old value to new value. */ * look if we have defined a converter from old value to new value. */
if (r == (size_t)-1 && this->many_cnvt != nullptr) r = this->many_cnvt(str); if (r == (size_t)-1 && this->many_cnvt != nullptr) r = this->many_cnvt(str);
if (r != (size_t)-1) return r; // and here goes converted value if (r != (size_t)-1) return r; // and here goes converted value

View File

@ -41,9 +41,9 @@ typedef HRESULT(__stdcall *API_XAudio2Create)(_Outptr_ IXAudio2** ppXAudio2, UIN
static FSoundDriver_XAudio2 iFSoundDriver_XAudio2; static FSoundDriver_XAudio2 iFSoundDriver_XAudio2;
/** /**
* Implementation of the IXAudio2VoiceCallback interface. * Implementation of the IXAudio2VoiceCallback interface.
* Provides buffered audio to XAudio2 from the OpenTTD mixer. * Provides buffered audio to XAudio2 from the OpenTTD mixer.
*/ */
class StreamingVoiceContext : public IXAudio2VoiceCallback class StreamingVoiceContext : public IXAudio2VoiceCallback
{ {
private: private:
@ -132,12 +132,12 @@ static HRESULT CreateXAudio(API_XAudio2Create xAudio2Create)
} }
/** /**
* Initialises the XAudio2 driver. * Initialises the XAudio2 driver.
* *
* @param parm Driver parameters. * @param parm Driver parameters.
* @return An error message if unsuccessful, or nullptr otherwise. * @return An error message if unsuccessful, or nullptr otherwise.
* *
*/ */
const char *SoundDriver_XAudio2::Start(const StringList &parm) const char *SoundDriver_XAudio2::Start(const StringList &parm)
{ {
HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED); HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
@ -261,8 +261,8 @@ const char *SoundDriver_XAudio2::Start(const StringList &parm)
} }
/** /**
* Terminates the XAudio2 driver. * Terminates the XAudio2 driver.
*/ */
void SoundDriver_XAudio2::Stop() void SoundDriver_XAudio2::Stop()
{ {
// Clean up XAudio2 // Clean up XAudio2

View File

@ -279,7 +279,7 @@ struct TerraformToolbarWindow : Window {
case DDSP_BUILD_OBJECT: case DDSP_BUILD_OBJECT:
if (!_settings_game.construction.freeform_edges) { if (!_settings_game.construction.freeform_edges) {
/* When end_tile is MP_VOID, the error tile will not be visible to the /* When end_tile is MP_VOID, the error tile will not be visible to the
* user. This happens when terraforming at the southern border. */ * user. This happens when terraforming at the southern border. */
if (TileX(end_tile) == Map::MaxX()) end_tile += TileDiffXY(-1, 0); if (TileX(end_tile) == Map::MaxX()) end_tile += TileDiffXY(-1, 0);
if (TileY(end_tile) == Map::MaxY()) end_tile += TileDiffXY(0, -1); if (TileY(end_tile) == Map::MaxY()) end_tile += TileDiffXY(0, -1);
} }

View File

@ -51,7 +51,7 @@ static std::optional<std::string> TestScriptAdminMakeJSON(std::string_view squir
{ {
auto vm = sq_open(1024); auto vm = sq_open(1024);
/* sq_compile creates a closure with our snipper, which is a table. /* sq_compile creates a closure with our snipper, which is a table.
* Add "return " to get the table on the stack. */ * Add "return " to get the table on the stack. */
std::string buffer = fmt::format("return {}", squirrel); std::string buffer = fmt::format("return {}", squirrel);
/* Insert an (empty) class for testing. */ /* Insert an (empty) class for testing. */

View File

@ -106,10 +106,10 @@ public:
static void SetDate(Date date, DateFract fract); static void SetDate(Date date, DateFract fract);
/** /**
* Calculate the year of a given date. * Calculate the year of a given date.
* @param date The date to consider. * @param date The date to consider.
* @return the year. * @return the year.
*/ */
static constexpr Year DateToYear(Date date) static constexpr Year DateToYear(Date date)
{ {
/* Hardcode the number of days in a year because we can't access CalendarTime from here. */ /* Hardcode the number of days in a year because we can't access CalendarTime from here. */
@ -117,10 +117,10 @@ public:
} }
/** /**
* Calculate the date of the first day of a given year. * Calculate the date of the first day of a given year.
* @param year the year to get the first day of. * @param year the year to get the first day of.
* @return the date. * @return the date.
*/ */
static constexpr Date DateAtStartOfYear(Year year) static constexpr Date DateAtStartOfYear(Year year)
{ {
int32_t year_as_int = static_cast<int32_t>(year); int32_t year_as_int = static_cast<int32_t>(year);

View File

@ -1609,7 +1609,7 @@ void Vehicle::UpdatePosition()
/** /**
* Update the bounding box co-ordinates of the vehicle * Update the bounding box co-ordinates of the vehicle
* @param update_cache Update the cached values for previous co-ordinate values * @param update_cache Update the cached values for previous co-ordinate values
*/ */
void Vehicle::UpdateBoundingBoxCoordinates(bool update_cache) const void Vehicle::UpdateBoundingBoxCoordinates(bool update_cache) const
{ {
Rect new_coord; Rect new_coord;

View File

@ -336,7 +336,7 @@ void VideoDriver_Cocoa::GameSizeChanged()
::GameSizeChanged(); ::GameSizeChanged();
/* We need to store the window size as non-Retina size in /* We need to store the window size as non-Retina size in
* the config file to get same windows size on next start. */ * the config file to get same windows size on next start. */
_cur_resolution.width = [ this->cocoaview frame ].size.width; _cur_resolution.width = [ this->cocoaview frame ].size.width;
_cur_resolution.height = [ this->cocoaview frame ].size.height; _cur_resolution.height = [ this->cocoaview frame ].size.height;
} }

View File

@ -1391,8 +1391,8 @@ static void ViewportAddKdtreeSigns(DrawPixelInfo *dpi)
const Sign *si = Sign::Get(item.id.sign); const Sign *si = Sign::Get(item.id.sign);
/* Don't draw if sign is owned by another company and competitor signs should be hidden. /* Don't draw if sign is owned by another company and competitor signs should be hidden.
* Note: It is intentional that also signs owned by OWNER_NONE are hidden. Bankrupt * Note: It is intentional that also signs owned by OWNER_NONE are hidden. Bankrupt
* companies can leave OWNER_NONE signs after them. */ * companies can leave OWNER_NONE signs after them. */
if (!show_competitors && _local_company != si->owner && si->owner != OWNER_DEITY) break; if (!show_competitors && _local_company != si->owner && si->owner != OWNER_DEITY) break;
signs.push_back(si); signs.push_back(si);

View File

@ -1,9 +1,9 @@
/* /*
* This file is part of OpenTTD. * This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** @file town_kdtree.h Declarations for accessing the k-d tree of towns */ /** @file town_kdtree.h Declarations for accessing the k-d tree of towns */