MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getName

Method getName

src/Savegame/Transfer.cpp:203–222  ·  view source on GitHub ↗

* Returns the name of the contents of the transfer. * @param lang Language to get strings from. * @return Name string. */

Source from the content-addressed store, hash-verified

201 * @return Name string.
202 */
203std::wstring Transfer::getName(Language *lang) const
204{
205 if (_soldier != 0)
206 {
207 return _soldier->getName();
208 }
209 else if (_craft != 0)
210 {
211 return _craft->getName(lang);
212 }
213 else if (_scientists != 0)
214 {
215 return lang->getString("STR_SCIENTISTS");
216 }
217 else if (_engineers != 0)
218 {
219 return lang->getString("STR_ENGINEERS");
220 }
221 return lang->getString(_itemId);
222}
223
224/**
225 * Returns the time remaining until the

Callers

nothing calls this directly

Calls 1

getStringMethod · 0.45

Tested by

no test coverage detected