From 2e94df845a434f19f634d6605061428512c2302f Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 27 Nov 2024 17:36:43 +0100 Subject: Ensure gitstrarray gets created with alive pointers. (cherry-picked from 9dc61e9faca5e8b05a1a2a2eed83a5468aeb6202) --- src/buildtool/file_system/git_repo.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/buildtool/file_system/git_repo.hpp') diff --git a/src/buildtool/file_system/git_repo.hpp b/src/buildtool/file_system/git_repo.hpp index df100b35..a937dc18 100644 --- a/src/buildtool/file_system/git_repo.hpp +++ b/src/buildtool/file_system/git_repo.hpp @@ -380,11 +380,7 @@ class GitRepo { class GitStrArray final { public: - void AddEntry(std::string entry) { - char* const entry_ptr = - entries_.emplace_back(std::move(entry)).data(); - entry_pointers_.push_back(entry_ptr); - } + void AddEntry(std::string entry); [[nodiscard]] auto Get() & noexcept -> git_strarray; private: -- cgit v1.2.3