Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioJPinto committed Apr 5, 2024
1 parent c841d66 commit 2912ea2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions engine/src/save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,23 @@
#include <string>
#include <vector>


#include "save.hpp" // Assuming this is the header file where Point is defined

int index = 0;

std::string generate_xml_path() {
// Define base directory
std::string base_dir = "../scenes/save";
// Define base directory
std::string base_dir = "../scenes/save";

// Generate file name based on the integer
std::ostringstream oss;
oss << base_dir << "/log_" << index << ".xml";
index++;
// Generate file name based on the integer
std::ostringstream oss;
oss << base_dir << "/log_" << index << ".xml";
index++;

return oss.str();
return oss.str();
}

void saveXmlToFile(rapidxml::xml_document<>& doc, const char* filename) {

std::ofstream file(filename);
if (!file.is_open()) {
std::cerr << "Unable to open file " << filename << " for writing!"
Expand Down

0 comments on commit 2912ea2

Please sign in to comment.