Author: mordante
Date: Sun Mar  6 20:08:09 2011
New Revision: 48801

URL: http://svn.gna.org/viewcvs/wesnoth?rev=48801&view=rev
Log:
Pass parameter by const ref instead of const value.

Issue found by cppcheck.

Modified:
    trunk/src/pathfind/teleport.cpp
    trunk/src/pathfind/teleport.hpp

Modified: trunk/src/pathfind/teleport.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/pathfind/teleport.cpp?rev=48801&r1=48800&r2=48801&view=diff
==============================================================================
--- trunk/src/pathfind/teleport.cpp (original)
+++ trunk/src/pathfind/teleport.cpp Sun Mar  6 20:08:09 2011
@@ -29,7 +29,7 @@
 }
 
 // This constructor is *only* meant for loading from saves
-pathfind::teleport_group::teleport_group(const config cfg) : cfg_(cfg, true), 
reversed_(utils::string_bool(cfg["reversed"], false)), id_(cfg["id"])
+pathfind::teleport_group::teleport_group(const config& cfg) : cfg_(cfg, true), 
reversed_(utils::string_bool(cfg["reversed"], false)), id_(cfg["id"])
 {
        assert(cfg.has_attribute("id"));
        assert(cfg.has_attribute("reversed"));

Modified: trunk/src/pathfind/teleport.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/pathfind/teleport.hpp?rev=48801&r1=48800&r2=48801&view=diff
==============================================================================
--- trunk/src/pathfind/teleport.hpp (original)
+++ trunk/src/pathfind/teleport.hpp Sun Mar  6 20:08:09 2011
@@ -37,7 +37,7 @@
        /*
         * Used to create the object from a saved file.
         */
-       teleport_group(const config cfg);
+       teleport_group(const config& cfg);
        /*
         *
         */


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to