Skip to content

Commit

Permalink
Code changes to resolve compiler warnings regarding "empty statements"
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Burleson <ThomasBurleson@Gmail.com>
  • Loading branch information
ThomasBurleson committed Apr 12, 2011
1 parent f6ebf76 commit 369c89a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion flare/src/flare/util/Maths.as
Expand Up @@ -342,7 +342,7 @@ package flare.util
while (a < b)
{ // binary search over the boundaries
if (quantiles[i] == x) {
for (; i>0 && quantiles[i-1] == x; --i);
for (; i>0 && quantiles[i-1] == x; --i) {}
break;
} else if (quantiles[i] < x) {
a = i+1;
Expand Down
20 changes: 10 additions & 10 deletions flare/src/flare/util/Strings.as
Expand Up @@ -194,7 +194,7 @@ package flare.util
private static function count(s:String, c:Number, i:int):int
{
var n:int = 0;
for (n=0; i<s.length && s.charCodeAt(i)==c; ++i, ++n);
for (n=0; i<s.length && s.charCodeAt(i)==c; ++i, ++n){}
return n;
}

Expand Down Expand Up @@ -278,7 +278,7 @@ package flare.util
// process custom formatting pattern
for (i=0; i<p.length;) {
c = p.charCodeAt(i);
for (n=0,j=i; j<p.length && p.charCodeAt(j)==c; ++j, ++n);
for (n=0,j=i; j<p.length && p.charCodeAt(j)==c; ++j, ++n){}

if (c == _DATE) {
if (n >= 4) {
Expand All @@ -301,7 +301,7 @@ package flare.util
else if (c == _FRAZ) {
a = int(Math.round(Math.pow(10,n) * (d.time/1000 % 1)));
s = String(a);
for (a=s.length; s.charCodeAt(a-1)==_ZERO; --a);
for (a=s.length; s.charCodeAt(a-1)==_ZERO; --a){}
b.writeUTFBytes(s.substring(0,a));
}
else if (c == _HOUR) {
Expand Down Expand Up @@ -540,7 +540,7 @@ package flare.util
if (ep >= 0) continue;
ep = i;
if (i<max && (c=p.charCodeAt(i+1))==_PLUS || c==_MINUS) ++i;
for (;i<max && p.charCodeAt(i+1)==_ZERO; ++i, ++ne);
for (;i<max && p.charCodeAt(i+1)==_ZERO; ++i, ++ne){}
ep2 = i;
if (p.charCodeAt(ep2) != _ZERO) { ep = ep2 = -1; ne=0; }
}
Expand All @@ -549,11 +549,11 @@ package flare.util
}
else if (c == _APOSTROPHE) {
// skip string literal
for(i=i+1; i<p.length && (c==_BACKSLASH || (c=p.charCodeAt(i))!=_APOSTROPHE); ++i);
for(i=i+1; i<p.length && (c==_BACKSLASH || (c=p.charCodeAt(i))!=_APOSTROPHE); ++i){}
}
else if (c == _QUOTE) {
// skip string literal
for(i=i+1; i<p.length && (c==_BACKSLASH || (c=p.charCodeAt(i))!=_QUOTE); ++i);
for(i=i+1; i<p.length && (c==_BACKSLASH || (c=p.charCodeAt(i))!=_QUOTE); ++i){}
}
}

Expand Down Expand Up @@ -606,8 +606,8 @@ package flare.util
// create strings for integral and fractional parts
sd = pad(xd, nd);
sf = (xf+1).toFixed(nf).substring(2); // add 1 to avoid AS3 bug
if (hash) for (; zd<sd.length && sd.charCodeAt(zd)==_ZERO; ++zd);
for (zf=sf.length; --zf>=0 && sf.charCodeAt(zf)==_ZERO;);
if (hash) for (; zd<sd.length && sd.charCodeAt(zd)==_ZERO; ++zd){}
for (zf=sf.length; --zf>=0 && sf.charCodeAt(zf)==_ZERO;){}


// ----------------------------------------------------------------
Expand Down Expand Up @@ -666,12 +666,12 @@ package flare.util
b.writeUTFBytes(p.charAt(++i));
}
else if (c == _APOSTROPHE) {
for(j=i+1; j<p.length && (c==_BACKSLASH || (c=p.charCodeAt(j))!=_APOSTROPHE); ++j);
for(j=i+1; j<p.length && (c==_BACKSLASH || (c=p.charCodeAt(j))!=_APOSTROPHE); ++j){}
if (j-i > 1) b.writeUTFBytes(p.substring(i+1,j));
i=j;
}
else if (c == _QUOTE) {
for(j=i+1; j<p.length && (c==_BACKSLASH || (c=p.charCodeAt(j))!=_QUOTE); ++j);
for(j=i+1; j<p.length && (c==_BACKSLASH || (c=p.charCodeAt(j))!=_QUOTE); ++j){}
if (j-i > 1) b.writeUTFBytes(p.substring(i+1,j));
i=j;
}
Expand Down
2 changes: 1 addition & 1 deletion flare/src/flare/vis/data/NodeSprite.as
Expand Up @@ -78,7 +78,7 @@ package flare.vis.data
/** The depth of this node in the tree structure. A value of zero
* indicates that this is a root node or that there is no tree. */
public function get depth():uint {
for (var d:uint=0, p:NodeSprite=parentNode; p!=null; p=p.parentNode, d++);
for (var d:uint=0, p:NodeSprite=parentNode; p!=null; p=p.parentNode, d++){}
return d;
}

Expand Down
2 changes: 1 addition & 1 deletion flare/src/flare/vis/operator/layout/Layout.as
Expand Up @@ -195,7 +195,7 @@ package flare.vis.operator.layout
protected function minAngle(a1:Number, a2:Number):Number
{
var inc:Number = 2*Math.PI*(a1 > a2 ? 1 : -1);
for (; Math.abs(a1-a2) > Math.PI; a2 += inc);
for (; Math.abs(a1-a2) > Math.PI; a2 += inc){}
return a2;
}

Expand Down

0 comments on commit 369c89a

Please sign in to comment.