Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pca006132 committed Dec 24, 2024
1 parent 6e4fe65 commit 01ef224
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/sdf/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ struct Operand {
bool isConst() const { return id <= -4; }
bool isResult() const { return id > 0; }
bool isNone() const { return id == 0; }

Check warning on line 30 in src/sdf/context.h

View check run for this annotation

Codecov / codecov/patch

src/sdf/context.h#L28-L30

Added lines #L28 - L30 were not covered by tests
int toConstIndex() const { return -(id + 4); }
int toInstIndex() const { return id - 1; }
size_t toConstIndex() const { return static_cast<size_t>(-(id + 4)); }
size_t toInstIndex() const { return static_cast<size_t>(id - 1); }
bool operator==(const Operand& other) const { return id == other.id; }
bool operator!=(const Operand& other) const { return id != other.id; }

Check warning on line 34 in src/sdf/context.h

View check run for this annotation

Codecov / codecov/patch

src/sdf/context.h#L33-L34

Added lines #L33 - L34 were not covered by tests
};
Expand Down
10 changes: 5 additions & 5 deletions src/sdf/tape.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ struct EvalContext {
Domain x = operand(tape[i + 2]);
operand(tape[i + 1]) = handle_unary(current, x);
i += 3;
// } else if (current == OpCode::CONST) {
// double x;
// std::memcpy(&x, tape.data() + i + 2, sizeof(x));
// operand(tape[i + 1]) = x;
// i += 2 + sizeof(x);
// } else if (current == OpCode::CONST) {
// double x;
// std::memcpy(&x, tape.data() + i + 2, sizeof(x));
// operand(tape[i + 1]) = x;
// i += 2 + sizeof(x);
} else if (current == OpCode::RETURN) {
return operand(tape[i + 1]);
} else {
Expand Down

0 comments on commit 01ef224

Please sign in to comment.