Author: tschmitz
Date: Thu Jul  7 07:47:45 2011
New Revision: 50192

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50192&view=rev
Log:
Optimized by adding "const&" to some fcn signatures

Modified:
    trunk/src/arrow.cpp
    trunk/src/arrow.hpp

Modified: trunk/src/arrow.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/arrow.cpp?rev=50192&r1=50191&r2=50192&view=diff
==============================================================================
--- trunk/src/arrow.cpp (original)
+++ trunk/src/arrow.cpp Thu Jul  7 07:47:45 2011
@@ -122,7 +122,7 @@
        }
 }
 
-bool arrow::valid_path(arrow_path_t path)
+bool arrow::valid_path(arrow_path_t const& path)
 {
        if (path.size() >= 2)
                return true;
@@ -264,7 +264,7 @@
        }
 }
 
-void arrow::invalidate_arrow_path(arrow_path_t path)
+void arrow::invalidate_arrow_path(arrow_path_t const& path)
 {
        if(!SCREEN) return;
 

Modified: trunk/src/arrow.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/arrow.hpp?rev=50192&r1=50191&r2=50192&view=diff
==============================================================================
--- trunk/src/arrow.hpp (original)
+++ trunk/src/arrow.hpp Thu Jul  7 07:47:45 2011
@@ -68,9 +68,9 @@
        virtual void draw_hex(map_location const& hex);
 
        /// Checks that the path is not of length 0 or 1
-       static bool valid_path(arrow_path_t path);
+       static bool valid_path(arrow_path_t const& path);
        /// Invalidates every hex along the given path
-       static void invalidate_arrow_path(arrow_path_t path);
+       static void invalidate_arrow_path(arrow_path_t const& path);
 
        virtual void notify_arrow_changed();
 


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

Reply via email to