summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-16Codechange: [Network] Let NetworkClientInfo use std::stringrubidium42
2021-05-16Codechange: [Network] Use std::string to populate the client list for ↵rubidium42
company stats
2021-05-16Codechange: [Network] Let NetworkCompanyInfo use std::stringrubidium42
2021-05-16Fix #9267, 47a99bb: [Squirrel] Heap use after freeRubidium
Due to 47a99bb the order of elements in the garbage collection chain has changed causing the class to be finalised before the instances of that class. Since the instance's array of member values depends on the size of the values in the class, the class finalisation resetting that size to 0 causes not all finalisations to run, which subsequently causes a heap use after free. So, just set the SQObjectPtrs to 'null' during the finalisation of the SQClass so the SQInstance can release all instance variables during its finalisation.
2021-05-15Fix #9269, f6d5c01: Hide windows without abusing WC_INVALIDglx22
2021-05-15Update: Translations from eintstranslators
estonian: 1 change by siimsoni indonesian: 39 changes by w13
2021-05-15Codechange: [Network] Let chat communication use std::stringrubidium42
2021-05-15Codechange: Use std::string GetString where convenientrubidium42
2021-05-15Add: GetString that returns std::string instead of filling a passed bufferrubidium42
2021-05-15Codechange: [Network] Let NetworkTextMessage use std::stringrubidium42
2021-05-15Change: Use gender-neutral pronounsrubidium42
2021-05-15Fix: empty undocumented branchesrubidium42
2021-05-15Fix: comparison of narrow type to wide type in loop (potential for infinite ↵Rubidium
loops)
2021-05-15Fix: [Network] Check on CIDR for netmask check considered everything validRubidium
2021-05-15Codechange: comparison result is always the same due to earlier checkRubidium
Practically the length of the handlers not being equal to the number of features is the problem as it means something was forgotten when adding a new feature, so static assert to that and let the existing check on the feature number take care of invalid data from the NewGRFs.
2021-05-14Codechange: use thread safe time functionsrubidium42
Functions like localtime, gmtime and asctime are not thread safe as they (might) reuse the same buffer. So use the safer _s/_r variant for localtime and gmtime, and use strftime in favour of asctime.
2021-05-14Codechange: [Network] Pass passwords as std::string to the network coderubidium42
2021-05-14Codechange: [Network] Use std::string for the internal handling of ↵rubidium42
admin/rcon passwords
2021-05-14Codechange: [Network] Use std::string for the internal handling of server ↵rubidium42
passwords
2021-05-14Codechange: [Network] Use std::string for the internal handling of company ↵rubidium42
passwords
2021-05-14Codechange: [Network] Make company state password std::stringrubidium42
2021-05-13Feature: Define refittability of default vehicles using cargo classes.frosch
This ensures that default vehicles can transport any NewGRF defined cargos, albeit with weird graphics and vehicle names. This also changes the refittability of default vehicles with default industries.
2021-05-13Fix: Resolve cargo-types of default vehicles via their cargo label.frosch
Default vehicles now behave as if they had a cargo translation table. This fixes default vehicles carrying seemingly random cargos, if NewGRF industry sets are present. This behavior is disabled, when a NewGRF touches any of the cargo-type or refitting properties. In that case it's up to the NewGRF to define its own cargo translation table.
2021-05-13Codechange: add constant for number of original cargoes.frosch
2021-05-13Codechange: clean up C-string support from settingsrubidium42
2021-05-13Codechange: move script settings to std::stringrubidium42
2021-05-13Codechange: move misc settings to std::stringrubidium42
2021-05-13Codechange: move font settings to std::stringrubidium42
2021-05-13Codechange: move currency settings to std::stringrubidium42
2021-05-13Codechange: move locale settings to std::stringrubidium42
2021-05-13Codechange: move client name in settings to std::stringrubidium42
2021-05-13Codechange: move server name/id in settings to std::stringrubidium42
2021-05-13Codechange: move hostnames in settings to std::stringrubidium42
2021-05-13Codechange: move passwords in settings to std::stringrubidium42
2021-05-13Change: further support for std::string in settingsrubidium42
2021-05-13Update: Translations from eintstranslators
french: 2 changes by glx22
2021-05-13Codechange: [Network] split CloseSocket and CloseConnection more clearly (#9261)Patric Stout
* Codechange: [Network] split CloseSocket and CloseConnection more clearly - CloseSocket now closes the actual OS socket. - CloseConnection frees up the resources to just before CloseSocket. - dtors call CloseSocket / CloseConnection where needed.
2021-05-13Fix: [Emscripten] Force secure WebSockets over HTTPS (#9248)embeddedt
2021-05-13Fix: Correct name of Golub-DobrzynPaweł Świątkowski
2021-05-13Fix: Replace Susz with LesznoPaweł Świątkowski
Susz is masculine, not neuter, so it should result in "Susz Mazowiecki", "Susz Morski", and not "Susz Mazowieckie" or "Susz Morskie". However, because order of the names whould not be changed, it was replaced with Leszno, which is neuter.
2021-05-13Codechange: remove pointless close call due to resolving virtual functions ↵Rubidium
statically in destructors In the destructors of many of the network related classes Close() is called, just like the top class in that hierarchy. However, due to virtual functions getting resolved statically in the destructor it would always call the empty Close() of the top class. Document the other cases where a virtual call is resolved statically.
2021-05-13Codechange: make explicit that virtual functions in a con/destructor are ↵Rubidium
resolved statically This as during construction the sub class has not been initialized yet, and during destruction the sub class has already been destroyed, so the overriding virtual function would be accessing uninitialized data.
2021-05-13Fix #9255: [Network] TCPConnecter crashes when hostname not found (#9259)Patric Stout
2021-05-13Codechange: Replace TILE_AREA_LOOP with range-based for loopsglx22
2021-05-12Fix #9256, 12e43c697d2: invalid read after free. (#9258)frosch
This also changes ScriptEventVehicleAutoReplaced when replacing wagons: The event is now only spawned, if the head engine changes, so only if the VehicleID of the consist changes. Previously replacing wagons spawned an event with OldVehicleID==NewVehicleID.
2021-05-12Codechange: make Window destruction not rely on undefined behavior.frosch
2021-05-12Codechange: use IterateFromBack/Front only if the order is important.frosch
Use Iterate if the order does not matter.
2021-05-12Codechange: use iterators instead of 'subranges' when iterating from a ↵frosch
specific window. Using iterators makes it easier to include or exclude the start window in the iteration.
2021-05-12Codechange: remove excessive templating in favour of a single const_cast.frosch
The const_cast will be removed again in a later commit.
2021-05-12Cleanup: remove unneeded labels and gotos.frosch
The window list supports deletion of arbitrary windows, while iterating over it.