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()) {
|
||||
std::smatch match = *matcher;
|
||||
|
||||
Hyperlink link;
|
||||
Hyperlink link{};
|
||||
link.line = line_index;
|
||||
link.destination = match[2].str();
|
||||
this->links.push_back(link);
|
||||
|
|
|
@ -54,10 +54,10 @@ protected:
|
|||
};
|
||||
|
||||
struct Hyperlink {
|
||||
size_t line; ///< Which line the link is on.
|
||||
size_t begin; ///< Character position on line the link begins.
|
||||
size_t end; ///< Character position on line the link end.
|
||||
std::string destination; ///< Destination for the link.
|
||||
size_t line = 0; ///< Which line the link is on.
|
||||
size_t begin = 0; ///< Character position on line the link begins.
|
||||
size_t end = 0; ///< Character position on line the link end.
|
||||
std::string destination{}; ///< Destination for the link.
|
||||
};
|
||||
|
||||
struct HistoryEntry {
|
||||
|
|
|
@ -857,7 +857,7 @@ static void AddAcceptedCargo_Town(TileIndex tile, CargoArray &acceptance, CargoT
|
|||
*/
|
||||
CargoArray GetAcceptedCargoOfHouse(const HouseSpec *hs)
|
||||
{
|
||||
CargoTypes always_accepted;
|
||||
CargoTypes always_accepted{};
|
||||
CargoArray acceptance{};
|
||||
AddAcceptedCargoOfHouse(INVALID_TILE, hs->Index(), hs, nullptr, acceptance, always_accepted);
|
||||
return acceptance;
|
||||
|
|
Loading…
Reference in New Issue