clang: fix -Wunused-but-set-variable
This commit is contained in:
@@ -342,6 +342,7 @@ namespace e57
|
||||
/// zero after write, if have too much data)
|
||||
}
|
||||
|
||||
#ifdef E57_MAX_VERBOSE
|
||||
///??? useful?
|
||||
/// Get approximation of number of bytes per record of CompressedVector
|
||||
/// and total of bytes used
|
||||
@@ -351,7 +352,6 @@ namespace e57
|
||||
totalBitsPerRecord += bytestream->bitsPerRecord();
|
||||
}
|
||||
|
||||
#ifdef E57_MAX_VERBOSE
|
||||
const float totalBytesPerRecord = std::max( totalBitsPerRecord / 8, 0.1F ); //??? trust
|
||||
|
||||
std::cout << " totalBytesPerRecord=" << totalBytesPerRecord << std::endl; //???
|
||||
|
||||
@@ -68,10 +68,8 @@ App::DocumentObjectExecReturn *FeatureViewAnnotation::execute(void)
|
||||
<< " font-size=\"" << Scale.getValue() << "\"" << endl
|
||||
<< " fill=\"#" << hr.str() << hg.str() << hb.str() << "\">" << endl;
|
||||
|
||||
int index=0;
|
||||
for (vector<string>::const_iterator it = Text.getValues().begin(); it != Text.getValues().end(); ++it) {
|
||||
result << "<tspan x=\"0\" dy=\"1em\">" << it->c_str() << "</tspan>" << endl;
|
||||
index++;
|
||||
}
|
||||
|
||||
result << "</text>" << endl << "</g>" << endl;
|
||||
|
||||
@@ -264,7 +264,6 @@ bool Simplify::flipped(vec3f p, int i0, int i1,
|
||||
std::vector<int> &deleted)
|
||||
{
|
||||
(void)i0; (void)v1;
|
||||
int bordercount=0;
|
||||
for (int k=0;k<v0.tcount;++k)
|
||||
{
|
||||
Triangle &t=triangles[refs[v0.tstart+k].tid];
|
||||
@@ -277,7 +276,6 @@ bool Simplify::flipped(vec3f p, int i0, int i1,
|
||||
|
||||
if (id1==i1 || id2==i1) // delete ?
|
||||
{
|
||||
bordercount++;
|
||||
deleted[k]=1;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ bool EarClippingTriangulator::Triangulate::Process(const std::vector<Base::Vecto
|
||||
/* remove nv-2 Vertices, creating 1 triangle every time */
|
||||
int count = 2*nv; /* error detection */
|
||||
|
||||
for(int m=0, v=nv-1; nv>2; ) {
|
||||
for(int v=nv-1; nv>2; ) {
|
||||
/* if we loop, it is probably a non-simple polygon */
|
||||
if (0 >= (count--)) {
|
||||
//** Triangulate: ERROR - probable bad polygon!
|
||||
@@ -449,8 +449,6 @@ bool EarClippingTriangulator::Triangulate::Process(const std::vector<Base::Vecto
|
||||
result.push_back( b );
|
||||
result.push_back( c );
|
||||
|
||||
m++;
|
||||
|
||||
/* remove v from remaining polygon */
|
||||
for(s=v,t=v+1;t<nv;s++,t++)
|
||||
V[s] = V[t];
|
||||
|
||||
@@ -58,19 +58,12 @@ void Edgecluster::Perform()
|
||||
return;
|
||||
|
||||
//adds all the vertices to a map, and store the associated edges
|
||||
Standard_Integer nbEdges = 0;
|
||||
Standard_Integer nbNonEdges = 0;
|
||||
std::vector<TopoDS_Edge>::iterator aVectorIt;
|
||||
for (aVectorIt = m_unsortededges.begin();aVectorIt != m_unsortededges.end();++aVectorIt)
|
||||
{
|
||||
if (IsValidEdge(*aVectorIt))
|
||||
{
|
||||
Perform(*aVectorIt);
|
||||
nbEdges++;
|
||||
}
|
||||
else
|
||||
{
|
||||
nbNonEdges++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1275,9 +1275,12 @@ void ViewProviderPartExt::updateVisual()
|
||||
// printing some information
|
||||
Base::Console().Log("ViewProvider update time: %f s\n",Base::TimeInfo::diffTimeF(start_time,Base::TimeInfo()));
|
||||
Base::Console().Log("Shape tria info: Faces:%d Edges:%d Nodes:%d Triangles:%d IdxVec:%d\n",numFaces,numEdges,numNodes,numTriangles,numLines);
|
||||
# else
|
||||
(void)numEdges;
|
||||
# endif
|
||||
VisualTouched = false;
|
||||
}
|
||||
|
||||
void ViewProviderPartExt::forceUpdate(bool enable) {
|
||||
if(enable) {
|
||||
if(++forceUpdateCount == 1) {
|
||||
|
||||
@@ -482,7 +482,6 @@ bool TaskPipeParameters::accept()
|
||||
}
|
||||
|
||||
std::vector<App::PropertyLinkSubList::SubSet> subSets;
|
||||
int index = 0;
|
||||
for (auto &subSet : pcPipe->Sections.getSubListValues()) {
|
||||
if (!pcActiveBody->hasObject(subSet.first) &&
|
||||
!pcActiveBody->getOrigin()->hasObject(subSet.first)) {
|
||||
@@ -495,8 +494,6 @@ bool TaskPipeParameters::accept()
|
||||
else {
|
||||
subSets.push_back(subSet);
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
pcPipe->Sections.setSubListValues(subSets);
|
||||
|
||||
@@ -3123,6 +3123,13 @@ void Adaptive2d::ProcessPolyNode(Paths boundPaths, Paths toolBoundPaths)
|
||||
<< " iter_per_point:" << (double(total_iterations) / ((double(total_points) + 0.001)))
|
||||
<< " total_exceeded:" << total_exceeded << " (" << 100 * double(total_exceeded) / double(total_points) << "%)"
|
||||
<< endl;
|
||||
#else
|
||||
(void)total_output_points;
|
||||
(void)over_cut_count;
|
||||
(void)total_exceeded;
|
||||
(void)total_points;
|
||||
(void)total_iterations;
|
||||
(void)perf_total_len;
|
||||
#endif
|
||||
|
||||
// warn about invalid paths being detected
|
||||
|
||||
@@ -1214,6 +1214,7 @@ return;
|
||||
|
||||
for(int j = 0; j < (int)p0.size(); j++) all.push_back(p0[j]);
|
||||
}
|
||||
(void)totalPoints;
|
||||
//FILE* d;
|
||||
//d = fopen("\\temp\\test.txt", "w");
|
||||
// for(int l = 0; l < all.size(); l++) all[l].print(d, "all","\n");
|
||||
|
||||
@@ -371,14 +371,12 @@ std::vector<LineSet> DrawGeomHatch::getTrimmedLines(DrawViewPart* source,
|
||||
}
|
||||
|
||||
std::vector<TechDraw::BaseGeomPtr> resultGeoms;
|
||||
int i = 0;
|
||||
for (auto& e: resultEdges) {
|
||||
TechDraw::BaseGeomPtr base = BaseGeom::baseFactory(e);
|
||||
if (!base) {
|
||||
throw Base::ValueError("DGH::getTrimmedLines - baseFactory failed");
|
||||
}
|
||||
resultGeoms.push_back(base);
|
||||
i++;
|
||||
}
|
||||
ls.setEdges(resultEdges);
|
||||
ls.setGeoms(resultGeoms);
|
||||
@@ -531,14 +529,12 @@ std::vector<LineSet> DrawGeomHatch::getFaceOverlay(int fdx)
|
||||
PATLineSpec hl = ls.getPATLineSpec();
|
||||
std::vector<TopoDS_Edge> candidates = DrawGeomHatch::makeEdgeOverlay(hl, bBox, ScalePattern.getValue());
|
||||
std::vector<TechDraw::BaseGeomPtr> resultGeoms;
|
||||
int i = 0;
|
||||
for (auto& e: candidates) {
|
||||
TechDraw::BaseGeomPtr base = BaseGeom::baseFactory(e);
|
||||
if (!base) {
|
||||
throw Base::ValueError("DGH::getFaceOverlay - baseFactory failed");
|
||||
}
|
||||
resultGeoms.push_back(base);
|
||||
i++;
|
||||
}
|
||||
ls.setEdges(candidates);
|
||||
ls.setGeoms(resultGeoms);
|
||||
|
||||
@@ -93,13 +93,13 @@ void TaskLinkDim::loadAvailDims()
|
||||
std::vector<App::DocumentObject*>::iterator itView = pageViews.begin();
|
||||
std::string result;
|
||||
int selRefType = TechDraw::DrawViewDimension::getRefTypeSubElements(m_subs);
|
||||
int found = 0;
|
||||
//int found = 0;
|
||||
for (; itView != pageViews.end(); itView++) {
|
||||
if ((*itView)->isDerivedFrom(TechDraw::DrawViewDimension::getClassTypeId())) {
|
||||
TechDraw::DrawViewDimension* dim = static_cast<TechDraw::DrawViewDimension*>((*itView));
|
||||
int dimRefType = dim->getRefType();
|
||||
if (dimRefType == selRefType) { //potential matches
|
||||
found++;
|
||||
// found++;
|
||||
if (dim->has3DReferences()) {
|
||||
if (dimReferencesSelection(dim)) {
|
||||
loadToTree(dim, true, guiDoc);
|
||||
|
||||
Reference in New Issue
Block a user