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!


#Actualcozzie

Posted 21 June 2013 - 12:40 PM

Thanks, I understand and read into it.

What I'll also take into account in this 'action', is check which member functions actually change the object or just use vars of the object.

For example most member functions within my 'd3d' class, are const functions (not yet in the code, but I'm gonna change that).

 

Just on the details, how about a LPDIRECT3DDEVICE9, which is already a pointer. I would say pass it as const reference since it's only used and not changed. Not sure though if the device pointer needs 'mutable' rights to execute functions within in. I hope not, so the code's clean on that side too.

 

Ps.; in my opinion "const ...." is better readable for me then "..... const", so I'm going for that style, both in the class member functions and the function parameters.


#1cozzie

Posted 21 June 2013 - 12:39 PM

Thanks, I understand and read into it.

What I'll also take into account in this 'action', is check which member functions actually change the object or just use vars of the object.

For example most member functions within my 'd3d' class, are const functions (not yet in the code, but I'm gonna change that).

 

Just on the details, how about a LPDIRECT3DDEVICE9, which is already a pointer. I would say pass it as const reference since it's only used and not changed. Not sure though if the device pointer needs 'mutable' rights to execute functions within in. I hope not, so the code's clean on that side too.


PARTNERS