1
0
forked from MeloNX/MeloNX
MeloNX/src/RyujinxAndroid/app/src/main/cpp/string_helper.cpp
2024-01-22 22:55:33 +00:00

25 lines
445 B
C++

//
// Created by Emmanuel Hansen on 10/30/2023.
//
#include "string_helper.h"
long string_helper::store_cstring(const char *cstr) {
auto id = ++current_id;
_map.insert({id, cstr});
return id;
}
long string_helper::store_string(const string& str) {
auto id = ++current_id;
_map.insert({id, str});
return id;
}
string string_helper::get_stored(long id) {
auto str = _map[id];
_map.erase(id);
return str;
}