+ fix various warnings with VC12

This commit is contained in:
wmayer 2016-04-16 12:02:58 +02:00
parent b5519922d8
commit 46d340530f
7 changed files with 10 additions and 5 deletions

View File

@ -54,7 +54,7 @@ ViewProviderOriginFeature::ViewProviderOriginFeature () {
ADD_PROPERTY_TYPE ( Size, (ViewProviderOrigin::defaultSize()), 0, App::Prop_ReadOnly,
"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
// Create node for scaling the origin

View File

@ -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);

View File

@ -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

View File

@ -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>

View File

@ -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;

View File

@ -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";

View File

@ -43,6 +43,7 @@
#ifdef _MSC_VER
# pragma warning(disable : 4005)
# pragma warning(disable : 4273)
#endif
#ifdef _PreComp_