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

アトリビュート @discardableResult は必要ない #30

Open
rrbox opened this issue Dec 25, 2022 · 2 comments
Open

アトリビュート @discardableResult は必要ない #30

rrbox opened this issue Dec 25, 2022 · 2 comments

Comments

@rrbox
Copy link
Owner

rrbox commented Dec 25, 2022

GameWidget や SKNodeBuilder では、作成したビルダー構造体は必ず別のオブジェクトやデータに還元されるため、このアトリビュートが必要無くなりました。Tsumiji もかつては NSMuableAttributedString を使用していたので、用途がわずかにありました。しかし昨今のアプデで AttributedString を使用するようになり、value semantics を確実に持つようになったので、@discardableResult は削除しても問題ないと思います。

@rrbox
Copy link
Owner Author

rrbox commented Dec 25, 2022

ビルダー外部の AttributedString を編集することができないので、init(_ nsAttributedString:) も削除します。

@rrbox
Copy link
Owner Author

rrbox commented Dec 25, 2022

コミットしました。40980c7

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

No branches or pull requests

1 participant