| 50 | |
| 51 | template <typename DICT> |
| 52 | static bool TryLoadFromFile(const std::string& fileName, |
| 53 | std::shared_ptr<DICT>* dict) { |
| 54 | FILE* fp = OpenSerializableFileUtf8(fileName, "rb"); |
| 55 | |
| 56 | if (fp == NULL) { |
| 57 | return false; |
| 58 | } |
| 59 | std::shared_ptr<DICT> loadedDict = DICT::NewFromFile(fp); |
| 60 | fclose(fp); |
| 61 | *dict = loadedDict; |
| 62 | return true; |
| 63 | } |
| 64 | |
| 65 | template <typename DICT> |
| 66 | static std::shared_ptr<DICT> NewFromFile(const std::string& fileName) { |
nothing calls this directly
no test coverage detected