Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Commit 09d6175

Browse files
authored
Remove warning about unused variables (#87)
1 parent 07785b7 commit 09d6175

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

OndselSolver/ASMTAssembly.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ std::shared_ptr<ASMTAssembly> MbD::ASMTAssembly::assemblyFromFile(const std::str
378378
}
379379
auto assembly = ASMTAssembly::With();
380380
auto str = assembly->popOffTop(lines);
381-
bool bool1 = str == "freeCAD: 3D CAD with Motion Simulation by askoh.com";
382-
bool bool2 = str == "OndselSolver";
381+
[[maybe_unused]] bool bool1 = str == "freeCAD: 3D CAD with Motion Simulation by askoh.com";
382+
[[maybe_unused]] bool bool2 = str == "OndselSolver";
383383
assert(bool1 || bool2);
384384
assert(assembly->readStringOffTop(lines) == "Assembly");
385385
assembly->setFilename(fileName);

OndselSolver/ASMTItem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void MbD::ASMTItem::createMbD(std::shared_ptr<System>, std::shared_ptr<Units>)
191191
assert(false);
192192
}
193193

194-
void MbD::ASMTItem::updateForFrame(size_t index)
194+
void MbD::ASMTItem::updateForFrame([[maybe_unused]] size_t index)
195195
{
196196
assert(false);
197197
}

OndselSolver/FullMatrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ namespace MbD {
698698
the1x = std::atan2(this->at(2)->at(0), sthe2z * this->at(2)->at(2));
699699
}
700700
the0z = std::atan2(this->at(0)->at(2), this->at(1)->at(2));
701-
auto aaaa = std::atan2(this->at(0)->at(2), -this->at(1)->at(2)); //Check missing minus is needed above. Smalltalk has missing minus too.
701+
[[maybe_unused]] auto aaaa = std::atan2(this->at(0)->at(2), -this->at(1)->at(2)); //Check missing minus is needed above. Smalltalk has missing minus too.
702702
assert(Numeric::equaltol(the0z, aaaa, 1.0e-9));
703703
}
704704
answer->atiput(0, the0z);

OndselSolver/FullVector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ namespace MbD {
180180
}
181181
}
182182
template<typename T>
183-
inline void FullVector<T>::conditionSelfWithTol(double tol)
183+
inline void FullVector<T>::conditionSelfWithTol([[maybe_unused]] double tol)
184184
{
185185
assert(false && tol != tol); // clang++ flips out with warnings if you don't use 'tol'
186186
// but suppressing that warning breaks Visual Studio.

0 commit comments

Comments
 (0)