Commit 9a7fc46e authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Removed unused variables and import (bug 542610)



Change-Id: I7ed3d2640fe3d83dda517fce632aa4cfd4b00df6
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent f5015a57
......@@ -1043,7 +1043,7 @@ namespace Ttcn {
checked(false), attributes_checked(false), legacy(true),
in_msgs(0), out_msgs(0), in_sigs(0), out_sigs(0),
testport_type(TP_REGULAR), port_type(PT_REGULAR),
provider_refs(), provider_types(), mapper_types(),
provider_refs(), provider_types(),
in_mappings(0), out_mappings(0), vardefs(defs), realtime(p_realtime)
{
}
......@@ -1062,7 +1062,6 @@ namespace Ttcn {
}
provider_refs.clear();
provider_types.clear();
mapper_types.clear();
delete in_mappings;
delete out_mappings;
delete vardefs;
......@@ -1504,9 +1503,6 @@ namespace Ttcn {
provider_types.add(t);
n_prov_t++;
provider_body = t->get_PortBody();
if (!legacy) {
provider_body->add_mapper_type(my_type);
}
}
} else {
provider_refs[p]->error("Type reference `%s' does not refer to a port "
......@@ -2496,24 +2492,6 @@ namespace Ttcn {
defPortClass(&pdef, target);
if (generate_skeleton && testport_type != TP_INTERNAL &&
(port_type != PT_USER || !legacy)) generateTestPortSkeleton(&pdef);
// Add includes for the mapped types if necessary
if (port_type == PT_PROVIDER) {
for (size_t i = 0; i < mapper_types.size(); i++) {
const Identifier& port_mod_name = mapper_types[i]->get_my_scope()->get_scope_mod()->get_modid();
const string& my_mod_name = my_type->get_my_scope()->get_scope_mod()->get_modid().get_ttcnname();
if (my_mod_name == port_mod_name.get_ttcnname()) {
continue;
}
char * incl = mprintf("#include \"%s.hh\"\n",
duplicate_underscores ? port_mod_name.get_name().c_str() : port_mod_name.get_ttcnname().c_str());
if (strstr(target->header.includes, incl) == NULL) {
target->header.includes = mputstr(target->header.includes, incl);
}
Free(incl);
}
}
Free(pdef.msg_in.elements);
for (size_t i = 0; i < pdef.msg_out.nElements; i++)
......
......@@ -402,8 +402,6 @@ private:
PortType_t port_type; // regular|provider|user
vector<Ttcn::Reference>provider_refs; ///< references to provider ports, for PT_USER
vector<Common::Type> provider_types; ///< the types that provider_refs refers to, for PT_USER
vector<Common::Type> mapper_types; ///< the types that map this port.
///< only for PT_USER && !legacy
TypeMappings *in_mappings, *out_mappings; ///< mappings for PT_USER
Definitions *vardefs; ///< variable definitions inside the port
bool realtime;
......@@ -480,7 +478,7 @@ public:
bool connect_can_receive_or_send(PortTypeBody *p_other) const;
Type* get_my_type() const { return my_type; }
bool is_legacy() const { return legacy; }
void add_mapper_type(Type* t) { mapper_types.add(t); }
//void add_mapper_type(Type* t) { mapper_types.add(t); }
void generate_code(output_struct *target);
virtual void dump(unsigned level) const;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment