Remove warning about unused variables (#87)

This commit is contained in:
Benjamin Nauck
2025-01-21 19:40:11 +01:00
committed by GitHub
parent 07785b7576
commit 09d6175a2b
4 changed files with 5 additions and 5 deletions

View File

@@ -378,8 +378,8 @@ std::shared_ptr<ASMTAssembly> MbD::ASMTAssembly::assemblyFromFile(const std::str
}
auto assembly = ASMTAssembly::With();
auto str = assembly->popOffTop(lines);
bool bool1 = str == "freeCAD: 3D CAD with Motion Simulation by askoh.com";
bool bool2 = str == "OndselSolver";
[[maybe_unused]] bool bool1 = str == "freeCAD: 3D CAD with Motion Simulation by askoh.com";
[[maybe_unused]] bool bool2 = str == "OndselSolver";
assert(bool1 || bool2);
assert(assembly->readStringOffTop(lines) == "Assembly");
assembly->setFilename(fileName);

View File

@@ -191,7 +191,7 @@ void MbD::ASMTItem::createMbD(std::shared_ptr<System>, std::shared_ptr<Units>)
assert(false);
}
void MbD::ASMTItem::updateForFrame(size_t index)
void MbD::ASMTItem::updateForFrame([[maybe_unused]] size_t index)
{
assert(false);
}

View File

@@ -698,7 +698,7 @@ namespace MbD {
the1x = std::atan2(this->at(2)->at(0), sthe2z * this->at(2)->at(2));
}
the0z = std::atan2(this->at(0)->at(2), this->at(1)->at(2));
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.
[[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.
assert(Numeric::equaltol(the0z, aaaa, 1.0e-9));
}
answer->atiput(0, the0z);

View File

@@ -180,7 +180,7 @@ namespace MbD {
}
}
template<typename T>
inline void FullVector<T>::conditionSelfWithTol(double tol)
inline void FullVector<T>::conditionSelfWithTol([[maybe_unused]] double tol)
{
assert(false && tol != tol); // clang++ flips out with warnings if you don't use 'tol'
// but suppressing that warning breaks Visual Studio.