diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index e2ba4aa9..def68312 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" {% if type == "Enum" %} diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index 3a3e47f7..845be712 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" @@ -16,7 +16,6 @@ void xml_attribute_to_bool( std::string bool_to_xml_attribute(const std::string& attribute_name, const bool* 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; diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 09594762..6e1901dd 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -113,7 +113,6 @@ string color_to_xml_attribute(const string& attribute_name, const Color* value) return " " + attribute_name + "=\"" + rgb + "\""; } - //////////////////////////////////////////////////////////////////////////////// // from_proto_color // @@ -132,7 +131,6 @@ Color from_proto_color(waypoint::RGBAColor attribute_value) { return color; } - //////////////////////////////////////////////////////////////////////////////// // color_to_proto // @@ -148,12 +146,12 @@ void color_to_proto(Color value, std::function sette int_alpha = convert_color_channel_float_to_int(value.alpha); } - uint32_t rgba = - ((convert_color_channel_float_to_int(value.red) & 0xff) << 24) - + ((convert_color_channel_float_to_int(value.green) & 0xff) << 16) - + ((convert_color_channel_float_to_int(value.blue) & 0xff) << 8) - + (int_alpha & 0xff); + uint32_t r = ((convert_color_channel_float_to_int(value.red) & 0xff) << 24); + uint32_t g = ((convert_color_channel_float_to_int(value.green) & 0xff) << 16); + uint32_t b = ((convert_color_channel_float_to_int(value.blue) & 0xff) << 8); + uint32_t a = (int_alpha & 0xff); + uint32_t rgba = r | g | b | a; color->set_rgba_color(rgba); setter(color); -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 575a0c05..8f3c58b6 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index 847a2ede..c49c92f6 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" #include "waypoint.pb.h" diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index c72864ff..73052d39 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index f360b0ca..34a98c9d 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index c41d7f4b..176522ab 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 379ba3c6..0fa34df4 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index f3f4be65..08e0bfb3 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" @@ -22,4 +22,3 @@ inline int const& from_proto_int(const int& x) { } void int_to_proto(int value, std::function setter); - diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 52f085e1..42248660 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 9f434181..70e2fc64 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -50,4 +50,4 @@ void marker_category_to_proto(MarkerCategory value, std::functionset_name(value.category); setter(category); -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index f6eb3de0..7bd6d53d 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index e4bc5559..ec3a3d37 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index dd6af69f..1d4f0aec 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index fdc89568..0d0cbf8a 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index 9b684111..7902ca24 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" #include "waypoint.pb.h" diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index 41b9d96d..fe9eba54 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index dfecc132..ceb45754 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index 6f57bc60..663fe137 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index f39ad346..f6d4da39 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp" diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 2bcea210..b8180528 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -33,7 +33,6 @@ string unique_id_to_xml_attribute(const string& attribute_name, const UniqueId* return " " + attribute_name + "=\"" + base64_encode(&(value->guid[0]), value->guid.size()) + "\""; } - UniqueId from_proto_unique_id(string attribute_value) { UniqueId unique_id; std::vector guid(attribute_value.begin(), attribute_value.end()); diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 268c594a..830914fc 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -1,9 +1,9 @@ #pragma once #include +#include #include #include -#include #include "../rapidxml-1.13/rapidxml.hpp"