Skip to content

Commit 4bdbd1b

Browse files
committed
Fix warning on signed-unsigned comparison.
1 parent f551147 commit 4bdbd1b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

srrealmodule/wrap_AtomicStructureAdapter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ class atomadapter_indexing : public vector_indexing_suite<
387387
}
388388
else rva->clear();
389389
// save memory by making a new copy for short slices
390-
const bool longslice = ((to - from) > rva->countSites() / 2);
390+
const index_type halflength = rva->countSites() / 2;
391+
const bool longslice = ((to - from) > halflength);
391392
object pyrv(longslice ? rv : rv->clone());
392393
return pyrv;
393394
}

0 commit comments

Comments
 (0)