We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f551147 commit 4bdbd1bCopy full SHA for 4bdbd1b
1 file changed
srrealmodule/wrap_AtomicStructureAdapter.cpp
@@ -387,7 +387,8 @@ class atomadapter_indexing : public vector_indexing_suite<
387
}
388
else rva->clear();
389
// save memory by making a new copy for short slices
390
- const bool longslice = ((to - from) > rva->countSites() / 2);
+ const index_type halflength = rva->countSites() / 2;
391
+ const bool longslice = ((to - from) > halflength);
392
object pyrv(longslice ? rv : rv->clone());
393
return pyrv;
394
0 commit comments