| 843 | } |
| 844 | |
| 845 | ConverterPtr Config::NewFromString(const std::string& json, |
| 846 | const std::string& configDirectory) { |
| 847 | std::vector<std::string> paths; |
| 848 | if (!configDirectory.empty()) { |
| 849 | if (configDirectory.back() == '/' || configDirectory.back() == '\\') { |
| 850 | paths.push_back(configDirectory); |
| 851 | } else { |
| 852 | paths.push_back(configDirectory + '/'); |
| 853 | } |
| 854 | } |
| 855 | return NewFromString(json, paths); |
| 856 | } |
| 857 | |
| 858 | ConverterPtr Config::NewFromString(const std::string& json, |
| 859 | const std::vector<std::string>& paths) { |