more suggestions for moving float -> double

This commit is contained in:
jrheinlaender 2013-03-25 20:40:41 +04:30
parent f6b53e6b57
commit d93907119d
4 changed files with 13 additions and 13 deletions

View File

@ -40,8 +40,8 @@
#include <Base/FutureWatcherProgress.h>
#include <Base/Parameter.h>
#include <Base/Sequencer.h>
#include <Base/Tools.h>
#include <App/Application.h>
#include <Base/Tools.h>
#include <App/Application.h>
#include <Mod/Mesh/App/Mesh.h>
#include <Mod/Mesh/App/MeshFeature.h>
#include <Mod/Mesh/App/Core/Algorithm.h>
@ -479,11 +479,11 @@ PROPERTY_SOURCE(Inspection::Feature, App::DocumentObject)
Feature::Feature()
{
ADD_PROPERTY(SearchRadius,(0.05f));
ADD_PROPERTY(Thickness,(0.0f));
ADD_PROPERTY(SearchRadius,(0.05));
ADD_PROPERTY(Thickness,(0.0));
ADD_PROPERTY(Actual,(0));
ADD_PROPERTY(Nominals,(0));
ADD_PROPERTY(Distances,(0.0f));
ADD_PROPERTY(Distances,(0.0));
}
Feature::~Feature()

View File

@ -35,8 +35,8 @@
#include <Inventor/events/SoMouseButtonEvent.h>
#include <Inventor/nodes/SoCoordinate3.h>
#include <Inventor/nodes/SoDrawStyle.h>
#include <Inventor/nodes/SoIndexedFaceSet.h>
#include <Inventor/nodes/SoPointSet.h>
#include <Inventor/nodes/SoIndexedFaceSet.h>
#include <Inventor/nodes/SoPointSet.h>
#include <Inventor/nodes/SoMaterial.h>
#include <Inventor/nodes/SoShapeHints.h>
#include <Inventor/nodes/SoOrthographicCamera.h>
@ -63,14 +63,14 @@ using namespace InspectionGui;
bool ViewProviderInspection::addflag = false;
App::PropertyFloatConstraint::Constraints ViewProviderInspection::floatRange = {1.0f,64.0f,1.0f};
App::PropertyFloatConstraint::Constraints ViewProviderInspection::floatRange = {1.0,64.0,1.0};
PROPERTY_SOURCE(InspectionGui::ViewProviderInspection, Gui::ViewProviderDocumentObject)
ViewProviderInspection::ViewProviderInspection() : search_radius(FLT_MAX)
{
ADD_PROPERTY_TYPE(OutsideGrayed,(false),"",(App::PropertyType) (App::Prop_Output|App::Prop_Hidden),"");
ADD_PROPERTY_TYPE(PointSize,(1.0f),"Display",(App::PropertyType) (App::Prop_None/*App::Prop_Hidden*/),"");
ADD_PROPERTY_TYPE(PointSize,(1.0),"Display",(App::PropertyType) (App::Prop_None/*App::Prop_Hidden*/),"");
PointSize.setConstraints(&floatRange);
pcColorRoot = new SoSeparator();

View File

@ -53,17 +53,17 @@ void PropertyGreyValueList::removeIndices( const std::vector<unsigned long>& uIn
std::vector<unsigned long> uSortedInds = uIndices;
std::sort(uSortedInds.begin(), uSortedInds.end());
const std::vector<float>& rValueList = getValues();
const std::vector<double>& rValueList = getValues();
assert( uSortedInds.size() <= rValueList.size() );
if ( uSortedInds.size() > rValueList.size() )
return;
std::vector<float> remainValue;
std::vector<double> remainValue;
remainValue.reserve(rValueList.size() - uSortedInds.size());
std::vector<unsigned long>::iterator pos = uSortedInds.begin();
for ( std::vector<float>::const_iterator it = rValueList.begin(); it != rValueList.end(); ++it ) {
for ( std::vector<double>::const_iterator it = rValueList.begin(); it != rValueList.end(); ++it ) {
unsigned long index = it - rValueList.begin();
if (pos == uSortedInds.end())
remainValue.push_back( *it );

View File

@ -65,7 +65,7 @@ using namespace Points;
PROPERTY_SOURCE(PointsGui::ViewProviderPoints, Gui::ViewProviderGeometryObject)
App::PropertyFloatConstraint::Constraints ViewProviderPoints::floatRange = {1.0f,64.0f,1.0f};
App::PropertyFloatConstraint::Constraints ViewProviderPoints::floatRange = {1.0,64.0,1.0};
ViewProviderPoints::ViewProviderPoints()
{