+ fix various warnings with VC12
This commit is contained in:
parent
b5519922d8
commit
46d340530f
|
@ -54,7 +54,7 @@ ViewProviderOriginFeature::ViewProviderOriginFeature () {
|
||||||
ADD_PROPERTY_TYPE ( Size, (ViewProviderOrigin::defaultSize()), 0, App::Prop_ReadOnly,
|
ADD_PROPERTY_TYPE ( Size, (ViewProviderOrigin::defaultSize()), 0, App::Prop_ReadOnly,
|
||||||
"Visual size of the feature" );
|
"Visual size of the feature" );
|
||||||
|
|
||||||
ShapeColor.setValue ( 50./255, 150./255, 250./255 ); // Set default color for origin (light-blue)
|
ShapeColor.setValue ( 50.f/255, 150.f/255, 250.f/255 ); // Set default color for origin (light-blue)
|
||||||
BoundingBox.setStatus(App::Property::Hidden, true); // Hide Boundingbox from the user due to it doesn't make sence
|
BoundingBox.setStatus(App::Property::Hidden, true); // Hide Boundingbox from the user due to it doesn't make sence
|
||||||
|
|
||||||
// Create node for scaling the origin
|
// Create node for scaling the origin
|
||||||
|
|
|
@ -62,9 +62,11 @@
|
||||||
using namespace Fem;
|
using namespace Fem;
|
||||||
|
|
||||||
// maybe in the c++ standard later, older compiler don't have round()
|
// maybe in the c++ standard later, older compiler don't have round()
|
||||||
|
#if _MSC_VER <= 1700
|
||||||
double round(double r) {
|
double round(double r) {
|
||||||
return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
|
return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
PROPERTY_SOURCE(Fem::Constraint, App::DocumentObject);
|
PROPERTY_SOURCE(Fem::Constraint, App::DocumentObject);
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
# pragma warning( disable : 4251 )
|
# pragma warning( disable : 4251 )
|
||||||
# pragma warning( disable : 4503 )
|
# pragma warning( disable : 4503 )
|
||||||
# pragma warning( disable : 4275 )
|
# pragma warning( disable : 4275 )
|
||||||
|
# pragma warning( disable : 4273 )
|
||||||
# pragma warning( disable : 4786 ) // specifier longer then 255 chars
|
# pragma warning( disable : 4786 ) // specifier longer then 255 chars
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -39,15 +39,16 @@
|
||||||
# define NOMINMAX
|
# define NOMINMAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef _PreComp_
|
|
||||||
// here get the warnings of too long specifiers disabled (needed for VC6)
|
// here get the warnings of too long specifiers disabled (needed for VC6)
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# pragma warning( disable : 4251 )
|
# pragma warning( disable : 4251 )
|
||||||
# pragma warning( disable : 4503 )
|
# pragma warning( disable : 4503 )
|
||||||
# pragma warning( disable : 4786 ) // specifier longer then 255 chars
|
# pragma warning( disable : 4786 ) // specifier longer then 255 chars
|
||||||
|
# pragma warning( disable : 4273 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _PreComp_
|
||||||
|
|
||||||
// standard
|
// standard
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
//#include <stdio.h>
|
//#include <stdio.h>
|
||||||
|
|
|
@ -88,7 +88,7 @@ void ViewProviderAddSub::attach(App::DocumentObject* obj) {
|
||||||
else
|
else
|
||||||
material->diffuseColor = SbColor(1,0,0);
|
material->diffuseColor = SbColor(1,0,0);
|
||||||
|
|
||||||
material->transparency = 0.7;
|
material->transparency = 0.7f;
|
||||||
auto* pick = new SoPickStyle();
|
auto* pick = new SoPickStyle();
|
||||||
pick->style = SoPickStyle::UNPICKABLE;
|
pick->style = SoPickStyle::UNPICKABLE;
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ void ViewProviderDatumCoordinateSystem::attach ( App::DocumentObject *obj ) {
|
||||||
|
|
||||||
getShapeRoot ()->addChild(axisLabelYToZTrans);
|
getShapeRoot ()->addChild(axisLabelYToZTrans);
|
||||||
SoRotation *rot = new SoRotation();
|
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);
|
getShapeRoot ()->addChild(rot);
|
||||||
t = new SoAsciiText();
|
t = new SoAsciiText();
|
||||||
t->string = "Z";
|
t->string = "Z";
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# pragma warning(disable : 4005)
|
# pragma warning(disable : 4005)
|
||||||
|
# pragma warning(disable : 4273)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _PreComp_
|
#ifdef _PreComp_
|
||||||
|
|
Loading…
Reference in New Issue
Block a user