Skip to content

Use function outside of loop#11752

Merged
LukasReschke merged 1 commit intomasterfrom
use-function-outside-of-loop
Oct 24, 2014
Merged

Use function outside of loop#11752
LukasReschke merged 1 commit intomasterfrom
use-function-outside-of-loop

Conversation

@LukasReschke
Copy link
Copy Markdown
Member

Otherwise the function is executed n times which is a lot of overhead.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add spaces, once you're on it.

@LukasReschke LukasReschke force-pushed the use-function-outside-of-loop branch from 2ff7eb7 to 52d8765 Compare October 23, 2014 22:04
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Spaces

@DeepDiver1975
Copy link
Copy Markdown
Member

for me it's anyhow questionable why for loops are used - generally speaking.
we should use foreach or if applicable map/reduce functions on arrays.

never the less 👍

@LukasReschke LukasReschke force-pushed the use-function-outside-of-loop branch from 52d8765 to fb4b030 Compare October 24, 2014 08:53
@MorrisJobke
Copy link
Copy Markdown
Contributor

👍

Otherwise the function is executed n times which is a lot of overhead
@LukasReschke LukasReschke force-pushed the use-function-outside-of-loop branch from fb4b030 to d060180 Compare October 24, 2014 10:28
@scrutinizer-notifier
Copy link
Copy Markdown

The inspection completed: No new issues

@ghost
Copy link
Copy Markdown

ghost commented Oct 24, 2014

🚀 Test PASSed. 🚀
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/1175/
🚀 Test PASSed. 🚀

LukasReschke added a commit that referenced this pull request Oct 24, 2014
@LukasReschke LukasReschke merged commit 77b8e15 into master Oct 24, 2014
@LukasReschke LukasReschke deleted the use-function-outside-of-loop branch October 24, 2014 11:54
@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants