MCPcopy Create free account
hub / github.com/ddnet/ddnet / Save

Method Save

src/game/editor/editor.cpp:7458–7473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7456}
7457
7458bool CEditor::Save(const char *pFilename)
7459{
7460 // Check if file with this name is already being saved at the moment
7461 if(std::any_of(std::begin(m_WriterFinishJobs), std::end(m_WriterFinishJobs), [pFilename](const std::shared_ptr<CDataFileWriterFinishJob> &Job) {
7462 return str_comp(pFilename, Job->RealFilename()) == 0;
7463 }))
7464 {
7465 return false;
7466 }
7467
7468 const auto &&ErrorHandler = [this](const char *pErrorMessage) {
7469 ShowFileDialogError("%s", pErrorMessage);
7470 log_error("editor/save", "%s", pErrorMessage);
7471 };
7472 return Map()->Save(pFilename, ErrorHandler);
7473}
7474
7475bool CEditor::HandleMapDrop(const char *pFilename, int StorageType)
7476{

Callers 2

CallbackSaveMapMethod · 0.45
CallbackSaveCopyMapMethod · 0.45

Calls 3

str_compFunction · 0.85
MapFunction · 0.85
RealFilenameMethod · 0.80

Tested by

no test coverage detected