MCPcopy Create free account
hub / github.com/LibreVR/Revive / StringArray

Class StringArray

ReviveInjector/main.cpp:141–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141class StringArray
142{
143public:
144 void add(const std::string& str)
145 {
146 strings.push_back(str);
147 ptrs.push_back(strings.back().c_str());
148 }
149
150 void clear()
151 {
152 strings.clear();
153 ptrs.clear();
154 }
155
156 const char** c_str()
157 {
158 return ptrs.data();
159 }
160
161 bool empty()
162 {
163 return ptrs.empty();
164 }
165
166 size_t size()
167 {
168 return ptrs.size();
169 }
170
171private:
172 std::vector<std::string> strings;
173 std::vector<const char*> ptrs;
174};
175
176int wmain(int argc, wchar_t *argv[]) {
177 if (argc < 2) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected