Skip to content

Commit ad94978

Browse files
committed
greater|less_than return bit
1 parent 36bb4c7 commit ad94978

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

voxec.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,9 @@ namespace {
768768
// @todo use regions for multi threading
769769
for (auto& ijk : *(regular_voxel_storage*)voxels) {
770770
groups->Get(ijk, &v);
771+
if (v == 0) {
772+
continue;
773+
}
771774
abstract_voxel_storage* r;
772775
auto it = map.find(v);
773776
if (it == map.end()) {
@@ -1494,14 +1497,15 @@ class op_compare : public voxel_operation {
14941497
symbol_value invoke(const scope_map& scope) const {
14951498
auto* voxels = (regular_voxel_storage*) scope.get_value<abstract_voxel_storage*>("input");
14961499
auto rhs = (uint32_t)scope.get_value<int>("rhs");
1497-
1498-
auto result = voxels->empty_copy();
1500+
1501+
bit_t fmt;
1502+
auto result = voxels->empty_copy_as(&fmt);
14991503
uint32_t val;
15001504

15011505
for (auto& pos : *voxels) {
15021506
voxels->Get(pos, &val);
15031507
if (Pred()(val, rhs)) {
1504-
result->Set(pos, &val);
1508+
result->Set(pos);
15051509
}
15061510
}
15071511

0 commit comments

Comments
 (0)