Skip to content
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

Eliminate redundant line number #1220

Merged
merged 3 commits into from
Mar 11, 2024
Merged

Conversation

hankem
Copy link
Member

@hankem hankem commented Dec 29, 2023

Some classes store a int lineNumber field next to a SourceCodeLocation.
This PR eliminates the redundancy, which suggests more degrees of freedom than there actually are.

@hankem hankem force-pushed the eliminate-redundant-lineNumber branch from 2a90db7 to 1df5bf0 Compare December 29, 2023 00:06
@hankem hankem requested a review from codecholeric December 29, 2023 00:26
hankem and others added 3 commits March 9, 2024 23:02
when that information is already stored in the sourceCodeLocation object

Signed-off-by: Manfred Hanke <[email protected]>
At the moment the line number is passed to the `Dependency`,
then it constructs a `SourceCodeLocation` from the `originClass` and the `lineNumber`.
In all cases we have a `SourceCodeLocation` outside already though.
And the `SourceCodeLocation` constructed in the constructor of `Dependency`
will just create an equivalent `SourceCodeLocation` to what we already have
when calling the constructor.
We can thus just pass on the `SourceCodeLocation` from the outside.

Signed-off-by: Peter Gafert <[email protected]>
@codecholeric codecholeric force-pushed the eliminate-redundant-lineNumber branch from 1df5bf0 to ef726a4 Compare March 9, 2024 22:02
@codecholeric codecholeric merged commit c4785e5 into main Mar 11, 2024
21 checks passed
@codecholeric codecholeric deleted the eliminate-redundant-lineNumber branch March 11, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants