-
-
Notifications
You must be signed in to change notification settings - Fork 668
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
STYLE: SingletonIndex does not need to store the unused func
parameter
#4164
Merged
dzenanz
merged 1 commit into
InsightSoftwareConsortium:master
from
N-Dekker:SingletonIndex-remove-func
Sep 6, 2023
Merged
STYLE: SingletonIndex does not need to store the unused func
parameter
#4164
dzenanz
merged 1 commit into
InsightSoftwareConsortium:master
from
N-Dekker:SingletonIndex-remove-func
Sep 6, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
area:Core
Issues affecting the Core module
type:Style
Style changes: no logic impact (indentation, comments, naming)
labels
Aug 20, 2023
N-Dekker
force-pushed
the
SingletonIndex-remove-func
branch
2 times, most recently
from
August 20, 2023 13:45
9d3c6b3
to
8fc9b00
Compare
Still "draft", just because I would like to have it processed after another pull request #4162, because of possible merge conflicts between them. Update, 5 September 2023: Ready for review now! |
No longer stored the `func` parameter from `SingletonIndex::SetGlobalInstance` and from `Singleton(globalName, func, deleteFunc)`, as it was never actually retrieved from `m_GlobalObjects` afterwards. Deprecated the `SingletonIndex::SingletonData` type alias, as it is no longer used internally anymore, and it should not be public either.
N-Dekker
force-pushed
the
SingletonIndex-remove-func
branch
from
September 5, 2023 20:17
8fc9b00
to
b6d9372
Compare
dzenanz
approved these changes
Sep 5, 2023
hjmjohnson
approved these changes
Sep 6, 2023
N-Dekker
added a commit
to N-Dekker/ITK
that referenced
this pull request
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 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
added a commit
to N-Dekker/ITK
that referenced
this pull request
Sep 14, 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, 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"
dzenanz
pushed a commit
that referenced
this pull request
Sep 18, 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, and made them `ITK_FUTURE_LEGACY_REMOVE`. 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"
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)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No longer stored the
func
parameter fromSingletonIndex::SetGlobalInstance
, and fromSingleton(globalName, func, deleteFunc)
, as it was never actually retrieved fromm_GlobalObjects
afterwards.Deprecated the
SingletonIndex::SingletonData
type alias, as it is no longer used internally anymore, and it should not be public either.Note that even with the initial commit a66337e (pull request #118, Francois Budin (@fbudin69500) and Hans Johnson (@hjmjohnson), February 2019), the value of the
func
parameter was never retrieved fromSingletonIndex::m_GlobalObjects
, looking at:https://github.com/InsightSoftwareConsortium/ITK/blob/a66337ec215c88f4900a2caf419b055483c42085/Modules/Core/Common/src/itkSingleton.cxx
https://github.com/InsightSoftwareConsortium/ITK/blob/a66337ec215c88f4900a2caf419b055483c42085/Modules/Core/Common/include/itkSingleton.h