Remove legacy RefObject/OutObject wrappers and finalize Java-idiomatic refactor#27
Draft
Remove legacy RefObject/OutObject wrappers and finalize Java-idiomatic refactor#27
Conversation
Co-authored-by: micycle1 <9304234+micycle1@users.noreply.github.com>
Co-authored-by: micycle1 <9304234+micycle1@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor to eliminate wrapper usage for Java-style references
Refactor C#-style ref/out wrappers to Java return/value patterns
Mar 1, 2026
Co-authored-by: micycle1 <9304234+micycle1@users.noreply.github.com>
Copilot
AI
changed the title
Refactor C#-style ref/out wrappers to Java return/value patterns
Remove legacy RefObject/OutObject wrappers and finalize Java-idiomatic refactor
Mar 1, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This project still carried Tangible wrapper classes used to emulate C#
ref/outsemantics. This PR completes the migration to Java-idiomatic value/return flow by removing remaining wrapper usage and deleting the obsolete wrapper types.Ref/out emulation removal in core paths
ClipperBase: replaced wrapper-based swaps and out-params with direct local swaps and typed return values (PopHorz()return,HorzDirectionresult).ClipperOffset: replacedRefObject<Integer>index threading withintin/out via method return.RectClip64/RectClipLines64: replaced mutableRefObjectcall patterns with explicit result carriers (LocationResult,IntersectionResult,NextLocationResult) and state assignment at call sites.Wrapper class removal
src/main/java/tangible/RefObject.javasrc/main/java/tangible/OutObject.javasrc/main/java9/module-info.javato removeexports tangible;after package deletion.Test alignment
TestPolytree: converted recursive counter propagation from wrapper mutation tointreturn flow.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.