-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify ssv related code in class Model #948
Conversation
This reverts commit e7d0cce.
src/OMSimulatorLib/System.cpp
Outdated
@@ -1689,6 +1692,9 @@ bool oms::System::copyResources() | |||
|
|||
void oms::System::getAllResources(std::vector<std::string>& resources) const | |||
{ | |||
if (!values.empty() && !Flags::ExportParametersInline()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will not work, and values.empty() will always be false and the ssv files will not be pushed to resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why will values.empty() always be false?
src/OMSimulatorLib/System.cpp
Outdated
@@ -1689,6 +1692,9 @@ bool oms::System::copyResources() | |||
|
|||
void oms::System::getAllResources(std::vector<std::string>& resources) const | |||
{ | |||
if (!values.empty() && !Flags::ExportParametersInline()) | |||
resources.push_back("resources/" + std::string(this->getFullCref()) + ".ssv"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ssv file can be pushed directly in exportoFile()
in Model.cpp
which is easily understandable i guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
values contain all the values that will be exported to the ssv file, right? Therefore, it would make sense to move everything ssv related to that class. I am not quite sure why it didn't work, but I would still like to move those things there.
This is just simplifying some of the existing code.