| 182 | } |
| 183 | |
| 184 | std::optional<CSimpleFile> CExportDialog::OpenFile(const fs::path &fileName) { // // // |
| 185 | CSimpleFile f {fileName, std::ios::out | std::ios::binary}; |
| 186 | if (!f) { |
| 187 | AfxMessageBox(FormattedW(L"Error: Could not open output file: %s\n", |
| 188 | conv::to_wide(f.GetErrorMessage()).data()), MB_ICONERROR); |
| 189 | return std::nullopt; |
| 190 | } |
| 191 | |
| 192 | return f; |
| 193 | } |
| 194 | |
| 195 | template <typename F> |
| 196 | void CExportDialog::WithFile(const fs::path &initFName, F f) { // // // |
nothing calls this directly
no test coverage detected