Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#ActualBitMaster

Posted 02 March 2014 - 03:01 AM

Your class violates the Rule of Three (depending on your needs Rule of Five in C++11). Either the class must be noncopyable or implement sane copy semantics.

 

If you have access to C++11 I would rather suggest to use std::vector instead of an int* pointer in the class and trust the compiler-generated copy/move constructors/assignment operators.


#1BitMaster

Posted 02 March 2014 - 02:36 AM

Your class violates the Rule of Three (depending on your needs Rule of Five in C++11). Either the class must be noncopyable or implement sane copy semantics.

 

If you have access to C++11 I would rather suggest to use std::vector instead of an int* pointer in the class and trust the compiler-generated copy/move constructors.


PARTNERS