equal
deleted
inserted
replaced
188 |
188 |
189 |
189 |
190 |
190 |
191 |
191 |
192 |
192 |
193 /* Copy the elements in the candidate_datatype_list in one symbol (from) |
|
194 * into the candidate_datatype_list of another symbol (to) |
|
195 */ |
|
196 void copy_candidate_datatype_list(symbol_c *from, symbol_c *to) { |
|
197 if ((NULL == from) || (NULL == to)) |
|
198 return; |
|
199 for(unsigned int i = 0; i < from->candidate_datatypes.size(); i++) |
|
200 to->candidate_datatypes.push_back(from->candidate_datatypes[i]); |
|
201 /* for some reason, the following alternative implementation results in a segmentation fault! I am not going to bother with this for now! */ |
|
202 // std::copy(from->candidate_datatypes.begin(), from->candidate_datatypes.end(), to->candidate_datatypes.begin()); |
|
203 } |
|
204 |
|
205 |
193 |
206 |
194 |
207 /* Intersect two candidate_datatype_lists. |
195 /* Intersect two candidate_datatype_lists. |
208 * Remove from list1 (origin, dest.) all elements that are not found in list2 (with). |
196 * Remove from list1 (origin, dest.) all elements that are not found in list2 (with). |
209 * In essence, list1 will contain the result of the intersection of list1 with list2. |
197 * In essence, list1 will contain the result of the intersection of list1 with list2. |