Skip to content

Commit

Permalink
Minor refactor to be consistent with similar code
Browse files Browse the repository at this point in the history
  • Loading branch information
bzuillsmith committed Sep 13, 2021
1 parent 4b503e8 commit db74f41
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/entities/solid.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ export default function EntityParser() {}

EntityParser.ForEntityName = 'SOLID';

EntityParser.prototype.parseEntity = function(scanner, currentGroup) {
EntityParser.prototype.parseEntity = function(scanner, curr) {
var entity;
entity = { type: currentGroup.value };
entity = { type: curr.value };
entity.points = [];
currentGroup = scanner.next();
while(currentGroup !== 'EOF') {
if(currentGroup.code === 0) break;
curr = scanner.next();
while(curr !== 'EOF') {
if(curr.code === 0) break;

switch(currentGroup.code) {
switch(curr.code) {
case 10:
entity.points[0] = helpers.parsePoint(scanner);
break;
Expand All @@ -30,10 +30,10 @@ EntityParser.prototype.parseEntity = function(scanner, currentGroup) {
entity.extrusionDirection = helpers.parsePoint(scanner);
break;
default: // check common entity attributes
helpers.checkCommonEntityProperties(entity, currentGroup);
helpers.checkCommonEntityProperties(entity, curr);
break;
}
currentGroup = scanner.next();
curr = scanner.next();
}

return entity;
Expand Down

0 comments on commit db74f41

Please sign in to comment.