Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Digital Extent

Inline functions

This topic is 5749 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
The compiler will attempt to assemble the program such that the function executes and returns its results without an actual function call, instead working the function code into the block where it is being called.

Which speeds up execution (one reason), but also increases the size of your executable.

How often? As often as the above reason is important enough to make use of it.

Share this post


Link to post
Share on other sites
the inline function must be declared in the .h (that says microsoft in vc++ 6.0)

you should use inline functions in small functions that you call very often; a good example is a get/setValue in a class.

inline void Class::getState(){
return state}

you get the point. don''t you?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!