diff --git a/src/AttributeParser.cpp b/src/AttributeParser.cpp index fc932e6..6b84053 100644 --- a/src/AttributeParser.cpp +++ b/src/AttributeParser.cpp @@ -1,4 +1,4 @@ -#include "ConstantPoolTags/Tags.h" +#include #include #include #include @@ -8,6 +8,7 @@ #include #include #include +#include attribute_info Attributes::AttributesParser(JavaClassFormat& jc) { @@ -28,7 +29,7 @@ attribute_info Attributes::AttributesParser(JavaClassFormat& jc) int idx = ret.info.data()->ToHostFormat(); ASSERT(VEC_ELEM_TYPE(jc.constant_pool[ret.attribute_name_index.ToHostFormat() - 1]) == TYPE(ConstantPoolTags::ConstantUtf8Info)); - std::string str = reinterpret_cast(std::any_cast(jc.constant_pool[ret.attribute_name_index.ToHostFormat() - 1]).bytes); + std::string str = std::any_cast(jc.constant_pool[ret.attribute_name_index.ToHostFormat() - 1]).bytes; switch ((ClassAttributes)crc32_rec(CRC32, str.c_str())) { @@ -39,6 +40,7 @@ attribute_info Attributes::AttributesParser(JavaClassFormat& jc) << std::any_cast(jc.constant_pool[idx - 1]).bytes << std::endl; SOURCE_FILE_Attribute attr; + attr.sourcefile_index = idx; // attr. break; }