Jump to content

[SOLVED] Incorrect forloop usage


photo

Recommended Posts

Posted

I was just looking in our code for incorrect usage of forloop, not using maximum_value but an expression like we do with for. Using regex search "forloop\(.+<.+\)" I found this in core/editor/editor_bodies.h:

				forloop(int j = 0; j < b.getNumShapes()) {
					Shape shape = b.getShape(j);
					if(shape.isEnabled() == 0) continue;
					shape.renderVisualizer(color);
				}
				forloop(int j = 0; j < b.getNumJoints()) {
					Joint joint = b.getJoint(j);
					if(joint.isEnabled() == 0) continue;
					joint.renderVisualizer(color);
				}

I expect that this should be forloop(int j = 0; b.getNumShapes()) {

 

  • 2 weeks later...
×
×
  • Create New...