mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Change alignment specifier to __attribute__((align(x)) for non VC++
This commit is contained in:
@ -9,17 +9,28 @@ std::unique_ptr<HeaderCommonMatchers::matcher_t> HeaderCommonMatchers::Align(con
|
||||
{
|
||||
const HeaderMatcherFactory create(labelSupplier);
|
||||
|
||||
return create.And({
|
||||
create.Type(HeaderParserValueType::DECLSPEC),
|
||||
create.Char('('),
|
||||
create.Type(HeaderParserValueType::ALIGN),
|
||||
create.Char('('),
|
||||
create.Integer(),
|
||||
create.Char(')'),
|
||||
create.Char(')')
|
||||
}).Transform([](HeaderMatcherFactory::token_list_t& values)
|
||||
{
|
||||
return HeaderParserValue::Integer(values[4].get().GetPos(), values[4].get().IntegerValue());
|
||||
return create.Or({
|
||||
create.And({
|
||||
create.Type(HeaderParserValueType::DECLSPEC),
|
||||
create.Char('('),
|
||||
create.Type(HeaderParserValueType::ALIGN),
|
||||
create.Char('('),
|
||||
create.Integer(),
|
||||
create.Char(')'),
|
||||
create.Char(')')
|
||||
}).Transform([](HeaderMatcherFactory::token_list_t& values)
|
||||
{
|
||||
return HeaderParserValue::Integer(values[4].get().GetPos(), values[4].get().IntegerValue());
|
||||
}),
|
||||
create.And({
|
||||
create.Type(HeaderParserValueType::ALIGNAS),
|
||||
create.Char('('),
|
||||
create.Integer(),
|
||||
create.Char(')')
|
||||
}).Transform([](HeaderMatcherFactory::token_list_t& values)
|
||||
{
|
||||
return HeaderParserValue::Integer(values[2].get().GetPos(), values[2].get().IntegerValue());
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@ -74,7 +85,7 @@ std::unique_ptr<HeaderCommonMatchers::matcher_t> HeaderCommonMatchers::Typename(
|
||||
std::ostringstream str;
|
||||
auto first = true;
|
||||
|
||||
for(const auto& token : values)
|
||||
for (const auto& token : values)
|
||||
{
|
||||
if (first)
|
||||
first = false;
|
||||
|
Reference in New Issue
Block a user