← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3655: Fix some more compilation warnings.

 

------------------------------------------------------------
revno: 3655
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Tue 2015-05-19 21:03:44 +0200
message:
  Fix some more compilation warnings.
modified:
  core/ForceContainer.hpp
  lib/triangulation/Tesselation.ipp
  py/_utils.cpp


--
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 'core/ForceContainer.hpp'
--- core/ForceContainer.hpp	2014-10-15 06:44:01 +0000
+++ core/ForceContainer.hpp	2015-05-19 19:03:44 +0000
@@ -52,7 +52,6 @@
 		vvector _force, _torque, _move, _rot, _permForce, _permTorque;
 		std::vector<size_t> sizeOfThreads;
 		size_t size;
-		size_t permSize;
 		bool syncedSizes;
 		int nThreads;
 		bool synced,moveRotUsed,permForceUsed;
@@ -74,7 +73,7 @@
 		// dummy function to avoid template resolution failure
 		friend class boost::serialization::access; template<class ArchiveT> void serialize(ArchiveT & ar, unsigned int version){}
 	public:
-		ForceContainer(): size(0), permSize(0),syncedSizes(true),synced(true),moveRotUsed(false),permForceUsed(false),_zero(Vector3r::Zero()),syncCount(0),lastReset(0){
+		ForceContainer(): size(0), syncedSizes(true),synced(true),moveRotUsed(false),permForceUsed(false),_zero(Vector3r::Zero()),syncCount(0),lastReset(0){
 			nThreads=omp_get_max_threads();
 			for(int i=0; i<nThreads; i++){
 				_forceData.push_back(vvector()); _torqueData.push_back(vvector());
@@ -175,7 +174,6 @@
 		void resizePerm(size_t newSize){
 			_permForce.resize(newSize,Vector3r::Zero());
 			_permTorque.resize(newSize,Vector3r::Zero());
-			permSize = newSize;
 			if (size<newSize) size=newSize;
 			syncedSizes=false;
 		}
@@ -224,7 +222,7 @@
 		std::vector<Vector3r> _permForce, _permTorque;
 		Body::id_t _maxId;
 		size_t size;
-		size_t permSize;
+		bool moveRotUsed, permForceUsed;
 		inline void ensureSize(Body::id_t id){ 
 			const Body::id_t idMaxTmp = max(id, _maxId);
 			_maxId = 0;
@@ -234,11 +232,10 @@
 			const Vector3r& getForceUnsynced (Body::id_t id){ return getForce(id);}
 			const Vector3r& getTorqueUnsynced(Body::id_t id){ return getForce(id);}
 		#endif
-		bool moveRotUsed, permForceUsed;
 		// dummy function to avoid template resolution failure
 		friend class boost::serialization::access; template<class ArchiveT> void serialize(ArchiveT & ar, unsigned int version){}
 	public:
-		ForceContainer(): size(0), permSize(0), moveRotUsed(false), permForceUsed(false), syncCount(0), lastReset(0), _maxId(0){}
+		ForceContainer(): _maxId(0), size(0), moveRotUsed(false), permForceUsed(false), syncCount(0), lastReset(0){}
 		const Vector3r& getForce(Body::id_t id){ensureSize(id); return _force[id];}
 		void  addForce(Body::id_t id,const Vector3r& f){ensureSize(id); _force[id]+=f;}
 		const Vector3r& getTorque(Body::id_t id){ensureSize(id); return _torque[id];}

=== modified file 'lib/triangulation/Tesselation.ipp'
--- lib/triangulation/Tesselation.ipp	2014-07-02 16:18:24 +0000
+++ lib/triangulation/Tesselation.ipp	2015-05-19 19:03:44 +0000
@@ -322,7 +322,7 @@
 			maxId = max(maxId, (int) vIt->info().id());
 		}
 		if ( (unsigned int)maxId+1 != vertexHandles.size() ) vertexHandles.resize ( maxId+1 );
-		bool redirected = true;
+		redirected = true;
 	} else return false;
 	return true;
 }

=== modified file 'py/_utils.cpp'
--- py/_utils.cpp	2015-05-04 16:59:30 +0000
+++ py/_utils.cpp	2015-05-19 19:03:44 +0000
@@ -317,8 +317,8 @@
 
 Real Shop__unbalancedForce(bool useMaxForce /*false by default*/){return Shop::unbalancedForce(useMaxForce);}
 py::tuple Shop__totalForceInVolume(){Real stiff; Vector3r ret=Shop::totalForceInVolume(stiff); return py::make_tuple(ret,stiff); }
-Real Shop__getSpheresVolume(int mask){ return Shop::getSpheresVolume(Omega::instance().getScene(), mask=mask);}
-Real Shop__getSpheresMass(int mask){ return Shop::getSpheresMass(Omega::instance().getScene(), mask=mask);}
+Real Shop__getSpheresVolume(int mask){ return Shop::getSpheresVolume(Omega::instance().getScene(), mask);}
+Real Shop__getSpheresMass(int mask){ return Shop::getSpheresMass(Omega::instance().getScene(), mask);}
 py::object Shop__kineticEnergy(bool findMaxId){
 	if(!findMaxId) return py::object(Shop::kineticEnergy());
 	Body::id_t maxId;
@@ -363,7 +363,7 @@
 	return 1;
 }
 
-void Shop__calm(int mask){ return Shop::calm(Omega::instance().getScene(), mask=mask);}
+void Shop__calm(int mask){ return Shop::calm(Omega::instance().getScene(), mask);}
 
 void setNewVerticesOfFacet(const shared_ptr<Body>& b, const Vector3r& v1, const Vector3r& v2, const Vector3r& v3) {
 	Vector3r center = inscribedCircleCenter(v1,v2,v3);
@@ -410,7 +410,7 @@
 	return ret;
 }
 
-Real Shop__getSpheresVolume2D(int mask=-1){ return Shop::getSpheresVolume2D(Omega::instance().getScene(), mask=mask);}
+Real Shop__getSpheresVolume2D(int mask=-1){ return Shop::getSpheresVolume2D(Omega::instance().getScene(), mask);}
 Real Shop__getVoidRatio2D(Real zlen=1){ return Shop::getVoidRatio2D(Omega::instance().getScene(),zlen);}
 py::tuple Shop__getStressAndTangent(Real volume=0, bool symmetry=true){return Shop::getStressAndTangent(volume,symmetry);}