Skip to content

Commit

Permalink
rename allocator parameter (Mercedes)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikir committed May 28, 2024
1 parent 8a77e08 commit 3bc0df8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions compiler/extensions/cpp/freemarker/Bitmask.cpp.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ ${types.reflectablePtr.name} ${name}::reflectable(const ${types.allocator.defaul
</#if>
}

${types.anyHolder.name} getAnyValue(const ${types.allocator.default}& allocator) const override
${types.anyHolder.name} getAnyValue(const ${types.allocator.default}& alloc) const override
{
return ${types.anyHolder.name}(m_bitmask, allocator);
return ${types.anyHolder.name}(m_bitmask, alloc);
}

${types.anyHolder.name} getAnyValue(const ${types.allocator.default}& allocator) override
${types.anyHolder.name} getAnyValue(const ${types.allocator.default}& alloc) override
{
return ${types.anyHolder.name}(m_bitmask, allocator);
return ${types.anyHolder.name}(m_bitmask, alloc);
}

<#-- bitmask is always unsigned -->
Expand All @@ -125,9 +125,9 @@ ${types.reflectablePtr.name} ${name}::reflectable(const ${types.allocator.defaul
return static_cast<double>(toUInt());
}

${types.string.name} toString(const ${types.allocator.default}& allocator) const override
${types.string.name} toString(const ${types.allocator.default}& alloc) const override
{
return m_bitmask.toString(allocator);
return m_bitmask.toString(alloc);
}

private:
Expand Down
12 changes: 6 additions & 6 deletions compiler/extensions/cpp/freemarker/Choice.cpp.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ ${I}return {};
using ::zserio::ReflectableConstAllocatorHolderBase<allocator_type>::getAnyValue;

</#if>
explicit Reflectable(<#if isConst>const </#if>${fullName}& object, const allocator_type& allocator) :
explicit Reflectable(<#if isConst>const </#if>${fullName}& object, const allocator_type& alloc) :
::zserio::Reflectable<#if isConst>Const</#if>AllocatorHolderBase<allocator_type>(<#rt>
<#lt>${fullName}::typeInfo(), allocator),
<#lt>${fullName}::typeInfo(), alloc),
m_object(object)
{}
<#if !isConst>
Expand Down Expand Up @@ -269,15 +269,15 @@ ${I}return {};
</#if>
}

${types.anyHolder.name} getAnyValue(const allocator_type& allocator) const override
${types.anyHolder.name} getAnyValue(const allocator_type& alloc) const override
{
return ${types.anyHolder.name}(::std::cref(m_object), allocator);
return ${types.anyHolder.name}(::std::cref(m_object), alloc);
}
<#if !isConst>

${types.anyHolder.name} getAnyValue(const allocator_type& allocator) override
${types.anyHolder.name} getAnyValue(const allocator_type& alloc) override
{
return ${types.anyHolder.name}(::std::ref(m_object), allocator);
return ${types.anyHolder.name}(::std::ref(m_object), alloc);
}
</#if>

Expand Down
12 changes: 6 additions & 6 deletions compiler/extensions/cpp/freemarker/Structure.cpp.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ const ${types.typeInfo.name}& ${name}::typeInfo()
using ::zserio::ReflectableConstAllocatorHolderBase<allocator_type>::getAnyValue;

</#if>
explicit Reflectable(<#if isConst>const </#if>${fullName}& object, const allocator_type& allocator) :
explicit Reflectable(<#if isConst>const </#if>${fullName}& object, const allocator_type& alloc) :
::zserio::Reflectable<#if isConst>Const</#if>AllocatorHolderBase<allocator_type>(<#rt>
<#lt>${fullName}::typeInfo(), allocator),
<#lt>${fullName}::typeInfo(), alloc),
m_object(object)
{}
<#if !isConst>
Expand Down Expand Up @@ -222,15 +222,15 @@ const ${types.typeInfo.name}& ${name}::typeInfo()
</#if>
</#if>

${types.anyHolder.name} getAnyValue(const allocator_type& allocator) const override
${types.anyHolder.name} getAnyValue(const allocator_type& alloc) const override
{
return ${types.anyHolder.name}(::std::cref(m_object), allocator);
return ${types.anyHolder.name}(::std::cref(m_object), alloc);
}
<#if !isConst>

${types.anyHolder.name} getAnyValue(const allocator_type& allocator) override
${types.anyHolder.name} getAnyValue(const allocator_type& alloc) override
{
return ${types.anyHolder.name}(::std::ref(m_object), allocator);
return ${types.anyHolder.name}(::std::ref(m_object), alloc);
}
</#if>

Expand Down
12 changes: 6 additions & 6 deletions compiler/extensions/cpp/freemarker/Union.cpp.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ const ${types.typeInfo.name}& ${name}::typeInfo()
using ::zserio::ReflectableConstAllocatorHolderBase<allocator_type>::getAnyValue;

</#if>
explicit Reflectable(<#if isConst>const </#if>${fullName}& object, const allocator_type& allocator) :
::zserio::Reflectable<#if isConst>Const</#if>AllocatorHolderBase<allocator_type>(${fullName}::typeInfo(), allocator),
explicit Reflectable(<#if isConst>const </#if>${fullName}& object, const allocator_type& alloc) :
::zserio::Reflectable<#if isConst>Const</#if>AllocatorHolderBase<allocator_type>(${fullName}::typeInfo(), alloc),
m_object(object)
{}
<#if !isConst>
Expand Down Expand Up @@ -366,15 +366,15 @@ const ${types.typeInfo.name}& ${name}::typeInfo()
</#if>
}

${types.anyHolder.name} getAnyValue(const allocator_type& allocator) const override
${types.anyHolder.name} getAnyValue(const allocator_type& alloc) const override
{
return ${types.anyHolder.name}(::std::cref(m_object), allocator);
return ${types.anyHolder.name}(::std::cref(m_object), alloc);
}
<#if !isConst>

${types.anyHolder.name} getAnyValue(const allocator_type& allocator) override
${types.anyHolder.name} getAnyValue(const allocator_type& alloc) override
{
return ${types.anyHolder.name}(::std::ref(m_object), allocator);
return ${types.anyHolder.name}(::std::ref(m_object), alloc);
}
</#if>

Expand Down

0 comments on commit 3bc0df8

Please sign in to comment.