Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 20 Aug 2012
Offline Last Active Jan 24 2014 11:48 AM

Posts I've Made

In Topic: Shouldn't inline functions be faster?

25 March 2013 - 03:19 PM

If you are using Microsoft visual studio you can force use '__forceinline' keyword, meanwhile 'inline' just gives the compiler a "hint". Inlining a function removes the call/ret overhead generated by compiler, but creates a larger executable image. The only time i use inlining is small tight loops where the overhead would cost too many cpu cycles, otherwise i rely on the compiler to make the right decision.

In Topic: key press in vector

01 January 2013 - 03:04 PM

My guess is that you are tying to queue up some keys then send them to some application?


	std::vector<SDLKey> v;

	for(std::vector<SDLKey>::const_iterator i = v.begin(); i != v.end(); i++)
		switch (*i)
			case SDLK_1:

			case SDLK_2:


In Topic: Creating a file named Time and Date problems

20 August 2012 - 04:38 AM

std::string TimeName = asctime(LocalTime);

Adds a \x0A (new line) at the end.