Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Minor improvements#51

Merged
cgcostume merged 5 commits intomasterfrom
improvements
Nov 26, 2014
Merged

Minor improvements#51
cgcostume merged 5 commits intomasterfrom
improvements

Conversation

@mjendruk
Copy link
Contributor

Hi. First of all, I really like the glbinding code. It's sleek. I have found three small things I would like to change though. These are:

  • although the default underlying type of scoped enums is int, CallbackMas was casted everywhere to an unsigned int. i changed that and also reduced the size to an unsigned char
  • AbstractFunction had a virtual destructor, which is unnecessary. I removed it so that 2787 Function objects need less memory ;)
  • callbacks were passed by value rather than by const ref.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to remain virtual

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you cannot ensure that there will be no subclasses, the destructor should be virtual - especially for abstract classes, they obviously are intended for further subclassing. even if subclasses have no explicit destructor please provide the destructor as virtual for abstract classes.

cgcostume pushed a commit that referenced this pull request Nov 26, 2014
@cgcostume cgcostume merged commit 59325fb into master Nov 26, 2014
@cgcostume cgcostume deleted the improvements branch November 26, 2014 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants