| 42 | } |
| 43 | |
| 44 | bool writeStringToFile( |
| 45 | const std::string& str, const std::string& filename, const std::string& folder) |
| 46 | { |
| 47 | // If the folder is empty, use the module path. |
| 48 | std::string pathFolder = folder.empty() ? getModulePath() : folder; |
| 49 | |
| 50 | // Create path from folder+filename (assume slash at end of folder.) |
| 51 | std::string path = pathFolder + filename; |
| 52 | |
| 53 | // Write string to output stream. |
| 54 | std::ofstream outputFile; |
| 55 | outputFile.open(path); |
| 56 | outputFile << str; |
| 57 | if (!outputFile.good()) |
| 58 | return false; |
| 59 | outputFile.close(); |
| 60 | |
| 61 | return true; |
| 62 | } |
| 63 | |
| 64 | void hashCombine(size_t& seed, size_t otherHash) |
| 65 | { |
no test coverage detected