namespace sig {
-void Copy(CYPool &pool, Element &lhs, Element &rhs) {
+void Copy(CYPool &pool, Element &lhs, const Element &rhs) {
lhs.name = pool.strdup(rhs.name);
if (rhs.type == NULL)
lhs.type = NULL;
lhs.offset = rhs.offset;
}
-void Copy(CYPool &pool, Signature &lhs, Signature &rhs) {
+void Copy(CYPool &pool, Signature &lhs, const Signature &rhs) {
size_t count(rhs.count);
lhs.count = count;
lhs.elements = new(pool) Element[count];
Copy(pool, lhs.elements[index], rhs.elements[index]);
}
-void Copy(CYPool &pool, Type &lhs, Type &rhs) {
+void Copy(CYPool &pool, Type &lhs, const Type &rhs) {
lhs.primitive = rhs.primitive;
lhs.name = pool.strdup(rhs.name);
lhs.flags = rhs.flags;
- if (rhs.primitive == '\0' || sig::IsAggregate(rhs.primitive))
+ if (sig::IsFunctional(rhs.primitive) || sig::IsAggregate(rhs.primitive))
Copy(pool, lhs.data.signature, rhs.data.signature);
else {
sig::Type *&lht(lhs.data.data.type);
- sig::Type *&rht(rhs.data.data.type);
+ sig::Type *const &rht(rhs.data.data.type);
if (rht == NULL)
lht = NULL;