Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
5c763675
Commit
5c763675
authored
Nov 13, 2016
by
Jakob Schöttl
Browse files
Remove unnecessary clone
parent
deacfdbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/src/org/vadere/simulator/projects/Scenario.java
View file @
5c763675
...
...
@@ -143,13 +143,11 @@ public class Scenario {
@Override
public
Scenario
clone
()
{
Scenario
clonedScenario
=
null
;
try
{
clonedScenario
=
JsonConverter
.
cloneScenarioRunManager
(
this
);
return
JsonConverter
.
cloneScenarioRunManager
(
this
);
}
catch
(
IOException
|
VadereClassNotFoundException
e
)
{
logger
.
error
(
e
);
throw
new
RuntimeException
(
e
);
}
return
clonedScenario
;
}
@Override
...
...
VadereSimulator/src/org/vadere/simulator/projects/VadereProject.java
View file @
5c763675
...
...
@@ -146,7 +146,7 @@ public class VadereProject implements ScenarioFinishedListener {
}
private
ScenarioRun
prepareNextScenario
()
{
final
Scenario
nextScenario
=
scenariosLeft
.
remove
()
.
clone
();
// TODO why clone? scenario should not be changed during a simulation run
final
Scenario
nextScenario
=
scenariosLeft
.
remove
()
;
notifySingleScenarioFinishListener
(
nextScenario
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment