File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -128,10 +128,11 @@ inline void InsertSpecConst(SpecConstInfo&) {}
128
128
template <typename Arg, typename ... Args>
129
129
inline void InsertSpecConst (SpecConstInfo& specConstInfo, Arg&& arg, Args&&... args)
130
130
{
131
+ std::size_t argSize = sizeof (arg.value );
131
132
auto offset = static_cast <uint32_t >(specConstInfo.data .size ());
132
- specConstInfo.data .resize (offset + sizeof (Arg) );
133
- std::memcpy (&specConstInfo.data [offset], &arg.value , sizeof (Arg) );
134
- specConstInfo.mapEntries .push_back ({arg.id , offset, sizeof (Arg) });
133
+ specConstInfo.data .resize (offset + argSize );
134
+ std::memcpy (&specConstInfo.data [offset], &arg.value , argSize );
135
+ specConstInfo.mapEntries .push_back ({arg.id , offset, argSize });
135
136
136
137
InsertSpecConst (specConstInfo, std::forward<Args>(args)...);
137
138
}
You can’t perform that action at this time.
0 commit comments