------------------------------------------------------------
revno: 3902
committer: Anton Gladky <[email protected]>
timestamp: Mon 2016-06-13 09:37:27 +0200
message:
Reduce size of flags in Bounds of InsertionSortCollider
Replace unsigned by bool. Size changed from 4 to 1 byte.
modified:
pkg/common/InsertionSortCollider.hpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to
https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/common/InsertionSortCollider.hpp'
--- pkg/common/InsertionSortCollider.hpp 2015-12-09 07:35:43 +0000
+++ pkg/common/InsertionSortCollider.hpp 2016-06-13 07:37:27 +0000
@@ -78,9 +78,7 @@
class GeneralIntegratorInsertionSortCollider;// Forward decleration of child to decleare it as friend
class InsertionSortCollider: public Collider{
-
friend class GeneralIntegratorInsertionSortCollider;
-
//! struct for storing bounds of bodies
struct Bounds{
//! coordinate along the given sortAxis
@@ -90,7 +88,7 @@
//! periodic cell coordinate
int period;
//! is it the minimum (true) or maximum (false) bound?
- struct{ unsigned hasBB:1; unsigned isMin:1; } flags;
+ struct {bool hasBB:true, isMin:true;} flags;
Bounds(Real coord_, Body::id_t id_, bool isMin): coord(coord_), id(id_), period(0){ flags.isMin=isMin; }
bool operator<(const Bounds& b) const {
/* handle special case of zero-width bodies, which could otherwise get min/max swapped in the unstable std::sort */
_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help : https://help.launchpad.net/ListHelp