# | Line 47 | Line 47 | const string CompositeVisitor::toString(){ | |
---|---|---|
47 | ||
48 | const string CompositeVisitor::toString(){ | |
49 | VisitorIterator i; | |
50 | + | string result; |
51 | char buffer[65535]; | |
52 | ||
53 | for(i = visitorList.begin(); i != visitorList.end(); i++){ | |
54 | sprintf(buffer, "Priority = %d\n", (*i).second); | |
55 | < | strcat(buffer, (((*i).first)->toString()).c_str()); |
55 | > | result += buffer; |
56 | > | |
57 | > | result += ((*i).first)->toString(); |
58 | } | |
59 | ||
60 | < | return buffer; |
60 | > | return result; |
61 | } | |
62 | ||
63 | void CompositeVisitor::update(){ |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |