Skip to content

Change signature for mp_result in Solve #35#37

Merged
anders9ustafsson merged 1 commit intomainfrom
GH-35
Oct 27, 2025
Merged

Change signature for mp_result in Solve #35#37
anders9ustafsson merged 1 commit intomainfrom
GH-35

Conversation

@anders9ustafsson
Copy link
Collaborator

No description provided.

@anders9ustafsson anders9ustafsson added this to the 1.3.0 milestone Oct 27, 2025
@anders9ustafsson anders9ustafsson self-assigned this Oct 27, 2025
@anders9ustafsson anders9ustafsson linked an issue Oct 27, 2025 that may be closed by this pull request
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the signature of the Solve method to use a regular parameter instead of a ref parameter for the mp_result argument. The change makes all optional parameters have default values and removes the ref keyword from the result parameter, simplifying the API for callers.

Key Changes:

  • Modified the Solve method signatures to remove ref from the result parameter and add default values to optional parameters
  • Updated all test method calls to pass result without the ref keyword
  • Relocated a variable declaration in mp_fdjac2 method (moved after comment block)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/MPFitLib/MPFit.cs Updated two Solve method overloads to remove ref from result parameter, added default values to optional parameters, and moved dvec variable declaration
src/MPFitLib.Test/TestMPFit.cs Removed ref keyword from all MPFit.Solve calls in test methods to align with the new signature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@anders9ustafsson anders9ustafsson merged commit 5356e52 into main Oct 27, 2025
1 check passed
@anders9ustafsson anders9ustafsson deleted the GH-35 branch October 27, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change ref mp_result? to mp_result? in public signatures

2 participants