Skip to content

STYLE: Remove unused parameter from SetGlobalInstance and Singleton#4209

Merged
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
N-Dekker:Remove-unused-parameter-SetGlobalInstance-Singleton
Sep 18, 2023
Merged

STYLE: Remove unused parameter from SetGlobalInstance and Singleton#4209
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
N-Dekker:Remove-unused-parameter-SetGlobalInstance-Singleton

Conversation

@N-Dekker
Copy link
Contributor

@N-Dekker N-Dekker commented Sep 7, 2023

Added overloads of SetGlobalInstance and Singleton without the unused func parameter. Let the new SetGlobalInstance overload just return void, instead of bool. Deprecated the original overloads.

Follow-up to:

pull request #4164 commit 6d1c4c7
"STYLE: SingletonIndex does not need to store the unused func parameter"

pull request #4162 commit 6ec6328
"STYLE: Let Singleton assume that SetGlobalInstance always returns true"

@github-actions github-actions bot added area:Core Issues affecting the Core module type:Style Style changes: no logic impact (indentation, comments, naming) labels Sep 7, 2023
@dzenanz
Copy link
Member

dzenanz commented Sep 7, 2023

We are probably going to do a major version bump soon, so this might be guarded under future legacy, instead of plain legacy.

@N-Dekker
Copy link
Contributor Author

N-Dekker commented Sep 7, 2023

We are probably going to do a major version bump soon, so this might be guarded under future legacy, instead of plain legacy.

So then, would it still be OK to keep the proposed [[deprecated]] attributes?

@dzenanz
Copy link
Member

dzenanz commented Sep 7, 2023

Absolutely!

@N-Dekker N-Dekker marked this pull request as ready for review September 7, 2023 14:43
@N-Dekker
Copy link
Contributor Author

N-Dekker commented Sep 7, 2023

@dzenanz Can you do a Request changes to make it ITK_FUTURE_LEGACY_REMOVE? 😃

Copy link
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

Like this?

Copy link
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

Squash upon merge?

@N-Dekker
Copy link
Contributor Author

N-Dekker commented Sep 8, 2023

@dzenanz GitHub automatically made you a co-author of the commits you suggested. Not sure if your co-authorship will be preserved when squashing. 😸 But I would like the commits to be squashed anyway 😄

@dzenanz
Copy link
Member

dzenanz commented Sep 8, 2023

Please completely disregard my co-authorship. I prefer a single commit too!

@thewtex thewtex requested a review from blowekamp September 9, 2023 23:59
Added overloads of `SetGlobalInstance` and `Singleton` without the unused `func`
parameter. Let the new `SetGlobalInstance` overload just return `void`, instead
of `bool`. Deprecated the original overloads, and made them
`ITK_FUTURE_LEGACY_REMOVE`.

Follow-up to:

pull request InsightSoftwareConsortium#4164
commit 6d1c4c7
"STYLE: SingletonIndex does not need to store the unused `func` parameter"

pull request InsightSoftwareConsortium#4162
commit 6ec6328
"STYLE: Let `Singleton` assume that SetGlobalInstance always returns true"
@N-Dekker N-Dekker force-pushed the Remove-unused-parameter-SetGlobalInstance-Singleton branch from f812c52 to eec0c42 Compare September 14, 2023 10:01
@N-Dekker
Copy link
Contributor Author

/azp run ITK.Linux.Python

@N-Dekker
Copy link
Contributor Author

I think the PR is ready now, but the CI says:

ghostflow-check-master Expected — Waiting for status to be reported

Any clue?

@dzenanz dzenanz merged commit 8598841 into InsightSoftwareConsortium:master Sep 18, 2023
@dzenanz
Copy link
Member

dzenanz commented Sep 18, 2023

I overrode it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module type:Style Style changes: no logic impact (indentation, comments, naming)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants