Skip to content

Commit

Permalink
fixing clang-format errors in the new proto functions
Browse files Browse the repository at this point in the history
  • Loading branch information
AsherGlick committed Sep 30, 2023
1 parent 6739780 commit 8e327e8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
8 changes: 6 additions & 2 deletions xml_converter/src/attribute/bool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ bool parse_bool(rapidxml::xml_attribute<>* input, std::vector<XMLError*>* errors
std::string stringify_bool(bool attribute_value);

// Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform
inline bool const& from_proto_bool(const bool &x) {return x;}
inline bool const& to_proto_bool(const bool &x) {return x;}
inline bool const& from_proto_bool(const bool& x) {
return x;
}
inline bool const& to_proto_bool(const bool& x) {
return x;
}
8 changes: 6 additions & 2 deletions xml_converter/src/attribute/float.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ float parse_float(rapidxml::xml_attribute<>* input, std::vector<XMLError*>* erro
std::string stringify_float(float attribute_value);

// Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform
inline float const& from_proto_float(const float &x) {return x;}
inline float const& to_proto_float(const float &x) {return x;}
inline float const& from_proto_float(const float& x) {
return x;
}
inline float const& to_proto_float(const float& x) {
return x;
}
8 changes: 6 additions & 2 deletions xml_converter/src/attribute/int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ int parse_int(rapidxml::xml_attribute<>* input, std::vector<XMLError*>* errors);
std::string stringify_int(int attribute_value);

// Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform
inline int const& from_proto_int(const int &x) {return x;}
inline int const& to_proto_int(const int &x) {return x;}
inline int const& from_proto_int(const int& x) {
return x;
}
inline int const& to_proto_int(const int& x) {
return x;
}
8 changes: 6 additions & 2 deletions xml_converter/src/attribute/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ std::string parse_string(rapidxml::xml_attribute<>* input, std::vector<XMLError*
std::string stringify_string(std::string attribute_value);

// Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform
inline std::string const& from_proto_string(const std::string &x) {return x;}
inline std::string const& to_proto_string(const std::string &x) {return x;}
inline std::string const& from_proto_string(const std::string& x) {
return x;
}
inline std::string const& to_proto_string(const std::string& x) {
return x;
}

0 comments on commit 8e327e8

Please sign in to comment.