Send a read only param as const reference.

The parameter was send as copy before.
This commit is contained in:
Mark de Wever 2011-03-06 19:08:11 +00:00
parent be1d8c2d6a
commit 9066e95698
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ pathfind::teleport_group::teleport_group(const config& cfg) : cfg_(cfg, true), r
assert(!cfg_.get_children("filter").empty());
}
pathfind::teleport_group::teleport_group(vconfig cfg, bool reversed) : cfg_(cfg), reversed_(reversed), id_()
pathfind::teleport_group::teleport_group(const vconfig& cfg, bool reversed) : cfg_(cfg), reversed_(reversed), id_()
{
assert(!cfg_.get_children("source").empty());
assert(!cfg_.get_children("target").empty());

View File

@ -41,7 +41,7 @@ public:
/*
*
*/
teleport_group(vconfig cfg, bool way_back = false);
teleport_group(const vconfig& cfg, bool way_back = false);
/*
* Fills the argument loc_pair if the unit u matches the groups filter.