modify code to suppress or fix warnings in gcc and clang (#41)
* first fix to start branch PR * explicit conversion from sizet to int * Array.h and DiagonalMatrix.h * many sizet to int conversions * removed some unused variables and added expl overrides * removed many unused parameters * more typing * even more * last of the easy changes
This commit is contained in:
@@ -28,7 +28,7 @@ MbD::PiecewiseFunction::PiecewiseFunction(Symsptr var, std::shared_ptr<std::vect
|
||||
transitions->insert(transitions->end(), trans->begin(), trans->end());
|
||||
}
|
||||
|
||||
Symsptr MbD::PiecewiseFunction::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
|
||||
Symsptr MbD::PiecewiseFunction::expandUntil(Symsptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
|
||||
{
|
||||
auto expansions = std::make_shared<std::vector<Symsptr>>();
|
||||
std::transform(functions->begin(),
|
||||
@@ -39,7 +39,7 @@ Symsptr MbD::PiecewiseFunction::expandUntil(Symsptr sptr, std::shared_ptr<std::u
|
||||
return std::make_shared<PiecewiseFunction>(xx, expansions, transitions);
|
||||
}
|
||||
|
||||
Symsptr MbD::PiecewiseFunction::simplifyUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
|
||||
Symsptr MbD::PiecewiseFunction::simplifyUntil(Symsptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
|
||||
{
|
||||
auto simplifications = std::make_shared<std::vector<Symsptr>>();
|
||||
std::transform(functions->begin(),
|
||||
@@ -70,7 +70,7 @@ Symsptr MbD::PiecewiseFunction::integrateWRT(Symsptr var)
|
||||
std::back_inserter(*integrals),
|
||||
[var](auto& func) { return func->integrateWRT(var); }
|
||||
);
|
||||
for (int i = 0; i < transitions->size(); i++)
|
||||
for (int i = 0; i < (int)transitions->size(); i++)
|
||||
{
|
||||
auto x = transitions->at(i)->getValue();
|
||||
auto fi = integrals->at(i)->getValue(x);
|
||||
@@ -85,7 +85,7 @@ Symsptr MbD::PiecewiseFunction::integrateWRT(Symsptr var)
|
||||
double MbD::PiecewiseFunction::getValue()
|
||||
{
|
||||
auto xval = xx->getValue();
|
||||
for (int i = 0; i < transitions->size(); i++)
|
||||
for (int i = 0; i < (int)transitions->size(); i++)
|
||||
{
|
||||
if (xval < transitions->at(i)->getValue()) {
|
||||
return functions->at(i)->getValue();
|
||||
@@ -99,14 +99,14 @@ std::ostream& MbD::PiecewiseFunction::printOn(std::ostream& s) const
|
||||
s << "PiecewiseFunction(" << *xx << ", " << std::endl;
|
||||
s << "functions{" << std::endl;
|
||||
s << *functions->at(0) << std::endl;
|
||||
for (int i = 1; i < functions->size(); i++)
|
||||
for (int i = 1; i < (int)functions->size(); i++)
|
||||
{
|
||||
s << *functions->at(i) << std::endl;
|
||||
}
|
||||
s << "}, " << std::endl;
|
||||
s << "transitions{" << std::endl;
|
||||
s << *transitions->at(0) << std::endl;
|
||||
for (int i = 1; i < transitions->size(); i++)
|
||||
for (int i = 1; i < (int)transitions->size(); i++)
|
||||
{
|
||||
s << *transitions->at(i) << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user