Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/release-windows.yml # src/company_base.h # src/company_cmd.cpp # src/company_gui.cpp # src/console_cmds.cpp # src/economy.cpp # src/economy_cmd.h # src/fios.h # src/goal.cpp # src/group_gui.cpp # src/network/core/config.h # src/network/network_admin.cpp # src/newgrf_config.cpp # src/os/windows/win32.cpp # src/saveload/afterload.cpp # src/saveload/company_sl.cpp # src/saveload/saveload.cpp # src/saveload/saveload_error.hpp # src/settings_gui.cpp # src/ship_cmd.cpp # src/stdafx.h # src/story.cpp # src/story_base.h # src/string.cpp # src/table/settings/economy_settings.ini # src/tests/CMakeLists.txt # src/tests/math_func.cpp
This commit is contained in:
@@ -142,7 +142,7 @@ struct StoryPageElement : StoryPageElementPool::PoolItem<&_story_page_element_po
|
||||
StoryPageElementType type; ///< Type of page element
|
||||
|
||||
uint32 referenced_id; ///< Id of referenced object (location, goal etc.)
|
||||
char *text; ///< Static content text of page element
|
||||
std::string text; ///< Static content text of page element
|
||||
|
||||
/**
|
||||
* We need an (empty) constructor so struct isn't zeroed (as C++ standard states)
|
||||
@@ -152,16 +152,16 @@ struct StoryPageElement : StoryPageElementPool::PoolItem<&_story_page_element_po
|
||||
/**
|
||||
* (Empty) destructor has to be defined else operator delete might be called with nullptr parameter
|
||||
*/
|
||||
inline ~StoryPageElement() { free(this->text); }
|
||||
inline ~StoryPageElement() { }
|
||||
};
|
||||
|
||||
/** Struct about stories, current and completed */
|
||||
struct StoryPage : StoryPagePool::PoolItem<&_story_page_pool> {
|
||||
uint32 sort_value; ///< A number that increases for every created story page. Used for sorting. The id of a story page is the pool index.
|
||||
Date date; ///< Date when the page was created.
|
||||
CompanyID company; ///< StoryPage is for a specific company; INVALID_COMPANY if it is global
|
||||
uint32 sort_value; ///< A number that increases for every created story page. Used for sorting. The id of a story page is the pool index.
|
||||
Date date; ///< Date when the page was created.
|
||||
CompanyID company; ///< StoryPage is for a specific company; INVALID_COMPANY if it is global
|
||||
|
||||
char *title; ///< Title of story page
|
||||
std::string title; ///< Title of story page
|
||||
|
||||
/**
|
||||
* We need an (empty) constructor so struct isn't zeroed (as C++ standard states)
|
||||
@@ -178,7 +178,6 @@ struct StoryPage : StoryPagePool::PoolItem<&_story_page_pool> {
|
||||
if (spe->page == this->index) delete spe;
|
||||
}
|
||||
}
|
||||
free(this->title);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user