Skip to content

Commit

Permalink
Remove warning about unused variables (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyarion authored Jan 21, 2025
1 parent 07785b7 commit 09d6175
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions OndselSolver/ASMTAssembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion OndselSolver/ASMTItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion OndselSolver/FullMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion OndselSolver/FullVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 09d6175

Please sign in to comment.