+ fix various warnings with VC12
This commit is contained in:
@@ -62,9 +62,11 @@
|
||||
using namespace Fem;
|
||||
|
||||
// maybe in the c++ standard later, older compiler don't have round()
|
||||
#if _MSC_VER <= 1700
|
||||
double round(double r) {
|
||||
return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
|
||||
}
|
||||
#endif
|
||||
|
||||
PROPERTY_SOURCE(Fem::Constraint, App::DocumentObject);
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
# pragma warning( disable : 4251 )
|
||||
# pragma warning( disable : 4503 )
|
||||
# pragma warning( disable : 4275 )
|
||||
# pragma warning( disable : 4273 )
|
||||
# pragma warning( disable : 4786 ) // specifier longer then 255 chars
|
||||
#endif
|
||||
|
||||
|
||||
@@ -39,15 +39,16 @@
|
||||
# define NOMINMAX
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _PreComp_
|
||||
// here get the warnings of too long specifiers disabled (needed for VC6)
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning( disable : 4251 )
|
||||
# pragma warning( disable : 4503 )
|
||||
# pragma warning( disable : 4786 ) // specifier longer then 255 chars
|
||||
# pragma warning( disable : 4273 )
|
||||
#endif
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <iostream>
|
||||
//#include <stdio.h>
|
||||
|
||||
@@ -88,7 +88,7 @@ void ViewProviderAddSub::attach(App::DocumentObject* obj) {
|
||||
else
|
||||
material->diffuseColor = SbColor(1,0,0);
|
||||
|
||||
material->transparency = 0.7;
|
||||
material->transparency = 0.7f;
|
||||
auto* pick = new SoPickStyle();
|
||||
pick->style = SoPickStyle::UNPICKABLE;
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ void ViewProviderDatumCoordinateSystem::attach ( App::DocumentObject *obj ) {
|
||||
|
||||
getShapeRoot ()->addChild(axisLabelYToZTrans);
|
||||
SoRotation *rot = new SoRotation();
|
||||
rot->rotation = SbRotation(SbVec3f(1,1,1), 2*M_PI/3);
|
||||
rot->rotation = SbRotation(SbVec3f(1,1,1), static_cast<float>(2*M_PI/3));
|
||||
getShapeRoot ()->addChild(rot);
|
||||
t = new SoAsciiText();
|
||||
t->string = "Z";
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable : 4005)
|
||||
# pragma warning(disable : 4273)
|
||||
#endif
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
Reference in New Issue
Block a user