Slay some cyclopian variables.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6082 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -61,8 +61,8 @@ public class PlaceViewUtil
|
|||||||
if (root instanceof Container) {
|
if (root instanceof Container) {
|
||||||
Container cont = (Container)root;
|
Container cont = (Container)root;
|
||||||
int ccount = cont.getComponentCount();
|
int ccount = cont.getComponentCount();
|
||||||
for (int i = 0; i < ccount; i++) {
|
for (int ii = 0; ii < ccount; ii++) {
|
||||||
dispatchWillEnterPlace(cont.getComponent(i), plobj);
|
dispatchWillEnterPlace(cont.getComponent(ii), plobj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -93,8 +93,8 @@ public class PlaceViewUtil
|
|||||||
if (root instanceof Container) {
|
if (root instanceof Container) {
|
||||||
Container cont = (Container)root;
|
Container cont = (Container)root;
|
||||||
int ccount = cont.getComponentCount();
|
int ccount = cont.getComponentCount();
|
||||||
for (int i = 0; i < ccount; i++) {
|
for (int ii = 0; ii < ccount; ii++) {
|
||||||
dispatchDidLeavePlace(cont.getComponent(i), plobj);
|
dispatchDidLeavePlace(cont.getComponent(ii), plobj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -346,8 +346,8 @@ public class ClientDObjectMgr
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < req.targets.size(); i++) {
|
for (int ii = 0; ii < req.targets.size(); ii++) {
|
||||||
@SuppressWarnings("unchecked") Subscriber<T> target = (Subscriber<T>)req.targets.get(i);
|
@SuppressWarnings("unchecked") Subscriber<T> target = (Subscriber<T>)req.targets.get(ii);
|
||||||
// add them as a subscriber
|
// add them as a subscriber
|
||||||
obj.addSubscriber(target);
|
obj.addSubscriber(target);
|
||||||
// and let them know that the object is in
|
// and let them know that the object is in
|
||||||
@@ -368,8 +368,8 @@ public class ClientDObjectMgr
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < req.targets.size(); i++) {
|
for (int ii = 0; ii < req.targets.size(); ii++) {
|
||||||
req.targets.get(i).requestFailed(oid, new ObjectAccessException(message));
|
req.targets.get(ii).requestFailed(oid, new ObjectAccessException(message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ public class CompoundEvent extends DEvent
|
|||||||
|
|
||||||
// we need to propagate our source oid to our constituent events
|
// we need to propagate our source oid to our constituent events
|
||||||
int ecount = _events.size();
|
int ecount = _events.size();
|
||||||
for (int i = 0; i < ecount; i++) {
|
for (int ii = 0; ii < ecount; ii++) {
|
||||||
_events.get(i).setSourceOid(sourceOid);
|
_events.get(ii).setSourceOid(sourceOid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,8 +141,8 @@ public class CompoundEvent extends DEvent
|
|||||||
|
|
||||||
// we need to propagate our target oid to our constituent events
|
// we need to propagate our target oid to our constituent events
|
||||||
int ecount = _events.size();
|
int ecount = _events.size();
|
||||||
for (int i = 0; i < ecount; i++) {
|
for (int ii = 0; ii < ecount; ii++) {
|
||||||
_events.get(i).setTargetOid(targetOid);
|
_events.get(ii).setTargetOid(targetOid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,8 +179,8 @@ public class CompoundEvent extends DEvent
|
|||||||
{
|
{
|
||||||
buf.append("COMPOUND:");
|
buf.append("COMPOUND:");
|
||||||
super.toString(buf);
|
super.toString(buf);
|
||||||
for (int i = 0; i < _events.size(); i++) {
|
for (int ii = 0; ii < _events.size(); ii++) {
|
||||||
buf.append(", ").append(_events.get(i));
|
buf.append(", ").append(_events.get(ii));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ public class OidList implements Streamable
|
|||||||
public boolean add (int oid)
|
public boolean add (int oid)
|
||||||
{
|
{
|
||||||
// check for existence
|
// check for existence
|
||||||
for (int i = 0; i < _size; i++) {
|
for (int ii = 0; ii < _size; ii++) {
|
||||||
if (_oids[i] == oid) {
|
if (_oids[ii] == oid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,10 +99,10 @@ public class OidList implements Streamable
|
|||||||
public boolean remove (int oid)
|
public boolean remove (int oid)
|
||||||
{
|
{
|
||||||
// scan for the oid in question
|
// scan for the oid in question
|
||||||
for (int i = 0; i < _size; i++) {
|
for (int ii = 0; ii < _size; ii++) {
|
||||||
if (_oids[i] == oid) {
|
if (_oids[ii] == oid) {
|
||||||
// shift the rest of the list back one
|
// shift the rest of the list back one
|
||||||
System.arraycopy(_oids, i+1, _oids, i, --_size-i);
|
System.arraycopy(_oids, ii+1, _oids, ii, --_size-ii);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,8 +115,8 @@ public class OidList implements Streamable
|
|||||||
*/
|
*/
|
||||||
public boolean contains (int oid)
|
public boolean contains (int oid)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _size; i++) {
|
for (int ii = 0; ii < _size; ii++) {
|
||||||
if (_oids[i] == oid) {
|
if (_oids[ii] == oid) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,11 +138,11 @@ public class OidList implements Streamable
|
|||||||
{
|
{
|
||||||
StringBuilder buf = new StringBuilder();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append("{");
|
buf.append("{");
|
||||||
for (int i = 0; i < _size; i++) {
|
for (int ii = 0; ii < _size; ii++) {
|
||||||
if (i > 0) {
|
if (ii > 0) {
|
||||||
buf.append(", ");
|
buf.append(", ");
|
||||||
}
|
}
|
||||||
buf.append(_oids[i]);
|
buf.append(_oids[ii]);
|
||||||
}
|
}
|
||||||
buf.append("}");
|
buf.append("}");
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
|||||||
@@ -493,8 +493,8 @@ public class PresentsDObjectMgr
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
OidList list = (OidList)field.get(target);
|
OidList list = (OidList)field.get(target);
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int ii = 0; ii < list.size(); ii++) {
|
||||||
clearReference(target, field.getName(), list.get(i));
|
clearReference(target, field.getName(), list.get(ii));
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -536,12 +536,12 @@ public class PresentsDObjectMgr
|
|||||||
// determine where to add the reference
|
// determine where to add the reference
|
||||||
Reference ref = new Reference(target.getOid(), oae.getName(), oid);
|
Reference ref = new Reference(target.getOid(), oae.getName(), oid);
|
||||||
int rpos = -1;
|
int rpos = -1;
|
||||||
for (int i = 0; i < refs.length; i++) {
|
for (int ii = 0; ii < refs.length; ii++) {
|
||||||
if (ref.equals(refs[i])) {
|
if (ref.equals(refs[ii])) {
|
||||||
log.warning("Ignoring request to track existing reference " + ref + ".");
|
log.warning("Ignoring request to track existing reference " + ref + ".");
|
||||||
return true;
|
return true;
|
||||||
} else if (refs[i] == null && rpos == -1) {
|
} else if (refs[ii] == null && rpos == -1) {
|
||||||
rpos = i;
|
rpos = ii;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,11 +588,11 @@ public class PresentsDObjectMgr
|
|||||||
}
|
}
|
||||||
|
|
||||||
// look for the matching reference
|
// look for the matching reference
|
||||||
for (int i = 0; i < refs.length; i++) {
|
for (int ii = 0; ii < refs.length; ii++) {
|
||||||
Reference ref = refs[i];
|
Reference ref = refs[ii];
|
||||||
if (ref != null && ref.equals(toid, field)) {
|
if (ref != null && ref.equals(toid, field)) {
|
||||||
// log.info("Removed reference " + refs[i] + ".");
|
// log.info("Removed reference " + refs[i] + ".");
|
||||||
refs[i] = null;
|
refs[ii] = null;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -818,10 +818,10 @@ public class PresentsDObjectMgr
|
|||||||
Reference ref = null;
|
Reference ref = null;
|
||||||
|
|
||||||
if (refs != null) {
|
if (refs != null) {
|
||||||
for (int i = 0; i < refs.length; i++) {
|
for (int ii = 0; ii < refs.length; ii++) {
|
||||||
if (refs[i].equals(reffer.getOid(), field)) {
|
if (refs[ii].equals(reffer.getOid(), field)) {
|
||||||
ref = refs[i];
|
ref = refs[ii];
|
||||||
refs[i] = null;
|
refs[ii] = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -312,8 +312,8 @@ public class ImportSet
|
|||||||
}
|
}
|
||||||
for (String name : toMunge) {
|
for (String name : toMunge) {
|
||||||
String newname = name;
|
String newname = name;
|
||||||
for (int i = 0; i < replace.length; i += 2) {
|
for (int ii = 0; ii < replace.length; ii += 2) {
|
||||||
newname = newname.replace(replace[i], replace[i + 1]);
|
newname = newname.replace(replace[ii], replace[ii + 1]);
|
||||||
}
|
}
|
||||||
_imports.add(newname);
|
_imports.add(newname);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -380,13 +380,13 @@ public class MessageBundle
|
|||||||
String argstr = compoundKey.substring(tidx+1);
|
String argstr = compoundKey.substring(tidx+1);
|
||||||
String[] args = StringUtil.split(argstr, "|");
|
String[] args = StringUtil.split(argstr, "|");
|
||||||
// unescape and translate the arguments
|
// unescape and translate the arguments
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int ii = 0; ii < args.length; ii++) {
|
||||||
// if the argument is tainted, do no further translation
|
// if the argument is tainted, do no further translation
|
||||||
// (it might contain |s or other fun stuff)
|
// (it might contain |s or other fun stuff)
|
||||||
if (MessageUtil.isTainted(args[i])) {
|
if (MessageUtil.isTainted(args[ii])) {
|
||||||
args[i] = MessageUtil.unescape(MessageUtil.untaint(args[i]));
|
args[ii] = MessageUtil.unescape(MessageUtil.untaint(args[ii]));
|
||||||
} else {
|
} else {
|
||||||
args[i] = xlate(MessageUtil.unescape(args[i]));
|
args[ii] = xlate(MessageUtil.unescape(args[ii]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get(key, (Object[]) args);
|
return get(key, (Object[]) args);
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ public class MethodProfiler
|
|||||||
@Override public void run ()
|
@Override public void run ()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < _methodCount; ++i) {
|
for (int ii = 0; ii < _methodCount; ++ii) {
|
||||||
MethodProfiler.this.enter(_method);
|
MethodProfiler.this.enter(_method);
|
||||||
Thread.sleep(_sleep);
|
Thread.sleep(_sleep);
|
||||||
MethodProfiler.this.exit(_method);
|
MethodProfiler.this.exit(_method);
|
||||||
|
|||||||
Reference in New Issue
Block a user