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

Refactor code flows that creating intermediate objects #94

Open
Bnaya opened this issue May 29, 2020 · 0 comments
Open

Refactor code flows that creating intermediate objects #94

Bnaya opened this issue May 29, 2020 · 0 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Bnaya
Copy link
Owner

Bnaya commented May 29, 2020

We have several functions that returning separate values inside an intermediate object.
These functions might be called very frequently internally.
These code flows needs to be refactored to no depend of that.

Ideas for how:

  • Maybe one of the values is not in use
  • Maybe one of the values can be deduced from the other one (ptr can be from ptrToPtr)
  • When arrays are involved: maybe pass array from the caller and not return new one

Example:

// @todo avoid intermediate object
return {
pointer,
pointerToThePointer,
};

// @todo avoid intermediate object
return {
pointers,
pointersToValuePointers,
};
}

Search for // @todo avoid intermediate object in the code

@Bnaya Bnaya added help wanted Extra attention is needed good first issue Good for newcomers labels May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants