MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / load

Method load

Tactility/Source/i18n/TextResources.cpp:57–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55std::string TextResources::ERROR_RESULT = "TXT_RES_ERROR";
56
57bool TextResources::load() {
58 std::vector<std::string> new_data;
59
60 // Resolve the language file that we need (depends on system language selection)
61 auto file_path = getI18nDataFilePath(path);
62 if (file_path.empty()) {
63 LOGGER.error("Couldn't find i18n data for {}", path);
64 return false;
65 }
66
67 file::readLines(file_path, true, [&new_data](const char* line) {
68 new_data.push_back(line);
69 });
70
71 if (new_data.empty()) {
72 LOGGER.error("Couldn't find i18n data for {}", path);
73 return false;
74 }
75
76 data = std::move(new_data);
77 return true;
78}
79
80}

Callers 15

trackball_isr_handlerFunction · 0.80
read_cbFunction · 0.80
initFunction · 0.80
deinitFunction · 0.80
setModeFunction · 0.80
getModeFunction · 0.80
headphoneDetectCallbackFunction · 0.80
keyboardDetectCallbackFunction · 0.80
read_sdk_jsonFunction · 0.80
sdk_downloadFunction · 0.80
DOCTEST_DEFINE_DECORATORFunction · 0.80
TimerTest.cppFile · 0.80

Calls 3

getI18nDataFilePathFunction · 0.85
readLinesFunction · 0.85
errorMethod · 0.80

Tested by 1

DOCTEST_DEFINE_DECORATORFunction · 0.64