Codechange: use std::string instead of stredup/free for stories

This commit is contained in:
Rubidium
2023-04-27 19:21:06 +02:00
committed by rubidium42
parent 3342967ad9
commit aac95eeaf5
4 changed files with 30 additions and 40 deletions

View File

@@ -35,7 +35,7 @@ static const SaveLoad _story_page_elements_desc[] = {
SLE_CONDVAR(StoryPageElement, type, SLE_FILE_U16 | SLE_VAR_U8, SL_MIN_VERSION, SLV_185),
SLE_CONDVAR(StoryPageElement, type, SLE_UINT8, SLV_185, SL_MAX_VERSION),
SLE_VAR(StoryPageElement, referenced_id, SLE_UINT32),
SLE_STR(StoryPageElement, text, SLE_STR | SLF_ALLOW_CONTROL, 0),
SLE_SSTR(StoryPageElement, text, SLE_STR | SLF_ALLOW_CONTROL),
};
struct STPEChunkHandler : ChunkHandler {
@@ -77,7 +77,7 @@ static const SaveLoad _story_pages_desc[] = {
SLE_VAR(StoryPage, date, SLE_UINT32),
SLE_CONDVAR(StoryPage, company, SLE_FILE_U16 | SLE_VAR_U8, SL_MIN_VERSION, SLV_185),
SLE_CONDVAR(StoryPage, company, SLE_UINT8, SLV_185, SL_MAX_VERSION),
SLE_STR(StoryPage, title, SLE_STR | SLF_ALLOW_CONTROL, 0),
SLE_SSTR(StoryPage, title, SLE_STR | SLF_ALLOW_CONTROL),
};
struct STPAChunkHandler : ChunkHandler {