Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Source Code Efficiency Minor Issue
Re: Source Code Efficiency Minor Issue [message #58531 is a reply to message #58529] Wed, 08 June 2022 21:09 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Amin,

Welcome on our forunm Smile

This is easy, because you have return statement within if block, so else if is redundant. The execution of if block will be break anyway. If there will be no return statement within if block, then you should use "else if" instead of "if" for performance reasons you have mentioned in your message.

Answer on stack overflow.

Klugier


U++ - one framework to rule them all.
 
Read Message
Read Message
Read Message
Previous Topic: Know what you're using. Size of some common types.
Next Topic: U++ libraries and TheIDE converted to Meson build system
Goto Forum:
  


Current Time: Mon Apr 29 16:43:27 CEST 2024

Total time taken to generate the page: 0.03636 seconds