mirror of https://github.com/OpenTTD/OpenTTD
Codefix: initialise a few uninitialised variables
parent
8a243f7391
commit
0b102db421
|
@ -251,7 +251,7 @@ void TextfileWindow::FindHyperlinksInMarkdown(Line &line, size_t line_index)
|
||||||
while (matcher != std::sregex_iterator()) {
|
while (matcher != std::sregex_iterator()) {
|
||||||
std::smatch match = *matcher;
|
std::smatch match = *matcher;
|
||||||
|
|
||||||
Hyperlink link;
|
Hyperlink link{};
|
||||||
link.line = line_index;
|
link.line = line_index;
|
||||||
link.destination = match[2].str();
|
link.destination = match[2].str();
|
||||||
this->links.push_back(link);
|
this->links.push_back(link);
|
||||||
|
|
|
@ -54,10 +54,10 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Hyperlink {
|
struct Hyperlink {
|
||||||
size_t line; ///< Which line the link is on.
|
size_t line = 0; ///< Which line the link is on.
|
||||||
size_t begin; ///< Character position on line the link begins.
|
size_t begin = 0; ///< Character position on line the link begins.
|
||||||
size_t end; ///< Character position on line the link end.
|
size_t end = 0; ///< Character position on line the link end.
|
||||||
std::string destination; ///< Destination for the link.
|
std::string destination{}; ///< Destination for the link.
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HistoryEntry {
|
struct HistoryEntry {
|
||||||
|
|
|
@ -857,7 +857,7 @@ static void AddAcceptedCargo_Town(TileIndex tile, CargoArray &acceptance, CargoT
|
||||||
*/
|
*/
|
||||||
CargoArray GetAcceptedCargoOfHouse(const HouseSpec *hs)
|
CargoArray GetAcceptedCargoOfHouse(const HouseSpec *hs)
|
||||||
{
|
{
|
||||||
CargoTypes always_accepted;
|
CargoTypes always_accepted{};
|
||||||
CargoArray acceptance{};
|
CargoArray acceptance{};
|
||||||
AddAcceptedCargoOfHouse(INVALID_TILE, hs->Index(), hs, nullptr, acceptance, always_accepted);
|
AddAcceptedCargoOfHouse(INVALID_TILE, hs->Index(), hs, nullptr, acceptance, always_accepted);
|
||||||
return acceptance;
|
return acceptance;
|
||||||
|
|
Loading…
Reference in New Issue