Skip to content

Commit

Permalink
fixing clang format errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AsherGlick committed Feb 9, 2025
1 parent f980acb commit 15a7b44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
9 changes: 6 additions & 3 deletions xml_converter/src/attribute/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@

using namespace std;

Image::Image() :filepath("", "") {}
Image::Image()
: filepath("", "") {
}

Image::Image(std::string base, std::string relative_filepath) : filepath(base, relative_filepath) {}
Image::Image(std::string base, std::string relative_filepath)
: filepath(base, relative_filepath) {
}

////////////////////////////////////////////////////////////////////////////////
// parse_image
Expand All @@ -39,7 +43,6 @@ void image_to_xml_attribute(
XMLWriterState* state,
const Image* value,
std::function<void(std::string)> setter) {

MarkerPackFile output_path = MarkerPackFile(state->marker_pack_root_directory, value->filepath.relative_filepath);
copy_file(value->filepath, output_path);
setter(value->filepath.relative_filepath);
Expand Down
3 changes: 1 addition & 2 deletions xml_converter/src/attribute/image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
#include <string>
#include <vector>

#include "../file_helper.hpp"
#include "../rapidxml-1.13/rapidxml.hpp"
#include "../state_structs/proto_reader_state.hpp"
#include "../state_structs/proto_writer_state.hpp"
#include "../state_structs/xml_reader_state.hpp"
#include "../state_structs/xml_writer_state.hpp"
#include "../file_helper.hpp"


class XMLError;

Expand Down
5 changes: 1 addition & 4 deletions xml_converter/src/file_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

using namespace std;


void copy_file(MarkerPackFile original_path, MarkerPackFile new_path) {
if (original_path.tmp_get_path() == new_path.tmp_get_path()) {
cerr << "File is being copied to itself" << original_path.tmp_get_path() << endl;
Expand All @@ -36,8 +35,7 @@ void copy_file(MarkerPackFile original_path, MarkerPackFile new_path) {
filesystem::copy_file(
filesystem::path(original_path.tmp_get_path()),
output_path,
filesystem::copy_options::overwrite_existing
);
filesystem::copy_options::overwrite_existing);
}
// ZipFile to Directory
else if (filesystem::is_regular_file(original_path.base) && filesystem::is_directory(new_path.base)) {
Expand All @@ -52,7 +50,6 @@ void copy_file(MarkerPackFile original_path, MarkerPackFile new_path) {
filesystem::create_directories(output_path.parent_path());
ofstream outfile(new_path.tmp_get_path(), ios::binary);
outfile << original_file->rdbuf();

}
// Directory to ZipFile (Unsupported until writing to ZipFiles is implemnted)
else if (filesystem::is_directory(original_path.base) && filesystem::is_regular_file(new_path.base)) {
Expand Down

0 comments on commit 15a7b44

Please sign in to comment.