Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Remove visitor usage #86

Merged
merged 6 commits into from
Jul 29, 2022
Merged

Remove visitor usage #86

merged 6 commits into from
Jul 29, 2022

Conversation

tadam50
Copy link
Contributor

@tadam50 tadam50 commented Jul 12, 2022

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest
No

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the current behavior? (You can also link to an open issue here)
Visitor is used

What is the new behavior (if this is a feature change)?
Visitor is no longer used

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

tadam50 added 4 commits July 1, 2022 14:06
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
@tadam50 tadam50 requested a review from flo-dup July 12, 2022 13:55
@tadam50 tadam50 self-assigned this Jul 12, 2022
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Copy link
Contributor

@flo-dup flo-dup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized there's a small duplicated code left

this.graph = graph;
}
private void visitLine(VoltageLevel vl, Line line, Graph graph) {
Branch.Side side = line.getTerminal(Branch.Side.ONE).getVoltageLevel() == vl ? Branch.Side.ONE : Branch.Side.TWO;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid duplicated code this can be done in addEdge, as it's the same for two-winding transformers.

Signed-off-by: Thomas ADAM <tadam@silicom.fr>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

93.6% 93.6% Coverage
0.0% 0.0% Duplication

@flo-dup flo-dup merged commit 8a56054 into main Jul 29, 2022
@flo-dup flo-dup deleted the refactor_visitEquipments branch July 29, 2022 09:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants