[prev in list] [next in list] [prev in thread] [next in thread]
List: bzflag-commits
Subject: SF.net SVN: bzflag:[22196] trunk/bzflag/src/bzflag/RobotPlayer.cxx
From: atupone () users ! sourceforge ! net
Date: 2011-10-29 13:56:36
Message-ID: E1RK9Om-0003fg-0r () sfp-svn-3 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 22196
http://bzflag.svn.sourceforge.net/bzflag/?rev=22196&view=rev
Author: atupone
Date: 2011-10-29 13:56:35 +0000 (Sat, 29 Oct 2011)
Log Message:
-----------
Possible inefficient checking for 'path' emptiness.
Modified Paths:
--------------
trunk/bzflag/src/bzflag/RobotPlayer.cxx
Modified: trunk/bzflag/src/bzflag/RobotPlayer.cxx
===================================================================
--- trunk/bzflag/src/bzflag/RobotPlayer.cxx 2011-10-28 18:48:10 UTC (rev 22195)
+++ trunk/bzflag/src/bzflag/RobotPlayer.cxx 2011-10-29 13:56:35 UTC (rev 22196)
@@ -139,7 +139,7 @@
bool shoot = false;
const float azimuth = getAngle();
// Allow shooting only if angle is near and timer has elapsed
- if ((int)path.size() != 0 && timerForShot <= 0.0f) {
+ if ((not path.empty()) && timerForShot <= 0.0f) {
float p1[3];
getProjectedPosition(target, p1);
const float* p2 = getPosition();
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World™ now supports Android™ Apps
for the BlackBerry® PlayBook™. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
BZFlag-commits mailing list
BZFlag-commits@lists.SourceForge.net
https://lists.SourceForge.net/lists/listinfo/bzflag-commits
irc: #BZFlag @ irc.freenode.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic