MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / OpenFile

Method OpenFile

Source/ExportDialog.cpp:184–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184std::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
195template <typename F>
196void CExportDialog::WithFile(const fs::path &initFName, F f) { // // //

Callers

nothing calls this directly

Calls 4

FormattedWFunction · 0.85
to_wideFunction · 0.85
GetErrorMessageMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected