diff options
| author | fschildt <florian.schildt@protonmail.com> | 2025-12-13 04:12:10 +0100 |
|---|---|---|
| committer | fschildt <florian.schildt@protonmail.com> | 2025-12-13 04:12:10 +0100 |
| commit | ebe4a92027aabc9c01caf0fbe791d22773abfe75 (patch) | |
| tree | e697282a885f54de7af22f36a58c1a684f67faf0 /src/common | |
| parent | f24d302be51f8cd2f4c5796283ea9f9a3be8d922 (diff) | |
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/MemoryManager.cpp | 9 | ||||
| -rw-r--r-- | src/common/MemoryManager.hpp | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/common/MemoryManager.cpp b/src/common/MemoryManager.cpp index 285535b..8c149ff 100644 --- a/src/common/MemoryManager.cpp +++ b/src/common/MemoryManager.cpp @@ -2,6 +2,15 @@ std::vector<std::u32string> MemoryManager::s_frame_string32s; + +std::u32string +int32_to_u32string(int32_t value) +{ + std::string str = std::to_string(value); + return std::u32string(str.begin(), str.end()); +} + + std::u32string& MemoryManager::GetString32(String32Id id) { diff --git a/src/common/MemoryManager.hpp b/src/common/MemoryManager.hpp index c8c7de0..d8460dc 100644 --- a/src/common/MemoryManager.hpp +++ b/src/common/MemoryManager.hpp @@ -8,6 +8,10 @@ using String32Id = uint32_t; +// temporary helper function +std::u32string int32_to_u32string(int32_t value); + + class MemoryManager { public: static std::u32string& GetString32(String32Id id); |
